metrics.tsx 812 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. export type MetricsType = 'set' | 'counter' | 'distribution' | 'numeric';
  2. export type MetricsOperation =
  3. | 'sum'
  4. | 'count_unique'
  5. | 'avg'
  6. | 'count'
  7. | 'max'
  8. | 'p50'
  9. | 'p75'
  10. | 'p95'
  11. | 'p99';
  12. export type MetricsApiResponse = {
  13. end: string;
  14. groups: {
  15. by: Record<string, string>;
  16. series?: Record<string, Array<number | null>>;
  17. totals?: Record<string, number | null>;
  18. }[];
  19. intervals: string[];
  20. query: string;
  21. start: string;
  22. };
  23. export type MetricsTagCollection = Record<string, MetricsTag>;
  24. export type MetricsTag = {
  25. key: string;
  26. };
  27. export type MetricsTagValue = {
  28. key: string;
  29. value: string;
  30. };
  31. export type MetricsMeta = {
  32. name: string;
  33. operations: MetricsOperation[];
  34. type: MetricsType;
  35. };
  36. export type MetricsMetaCollection = Record<string, MetricsMeta>;