metrics.tsx 780 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. export type MetricsColumnType = 'set' | 'counter' | 'duration';
  2. export type MetricsApiResponse = {
  3. end: string;
  4. groups: {
  5. by: Record<string, string>;
  6. series: Record<string, Array<number | null>>;
  7. totals: Record<string, number | null>;
  8. }[];
  9. intervals: string[];
  10. query: string;
  11. start: string;
  12. };
  13. export type MetricTagCollection = Record<string, MetricTag>;
  14. export type MetricTag = {
  15. key: string;
  16. };
  17. export type MetricTagValue = {
  18. key: string;
  19. value: string;
  20. };
  21. export type MetricMeta = {
  22. name: string;
  23. operations: string[];
  24. type: MetricsColumnType;
  25. };
  26. export type MetricsMetaCollection = Record<string, MetricMeta>;
  27. export type MetricQuery = {
  28. aggregation?: string;
  29. groupBy?: string[];
  30. legend?: string;
  31. metricMeta?: MetricMeta;
  32. };