@kopai/ui 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -743,7 +743,14 @@ const METRICS_TREE = {
743
743
  root: {
744
744
  key: "root",
745
745
  type: "Stack" as const,
746
- children: ["heading", "description", "discovery-card"],
746
+ children: [
747
+ "heading",
748
+ "ingestion-heading",
749
+ "ingestion-grid",
750
+ "discovery-heading",
751
+ "description",
752
+ "discovery-card",
753
+ ],
747
754
  parentKey: "",
748
755
  props: {
749
756
  direction: "vertical" as const,
@@ -758,6 +765,81 @@ const METRICS_TREE = {
758
765
  parentKey: "root",
759
766
  props: { text: "Metrics", level: "h2" as const },
760
767
  },
768
+ "ingestion-heading": {
769
+ key: "ingestion-heading",
770
+ type: "Heading" as const,
771
+ children: [],
772
+ parentKey: "root",
773
+ props: { text: "OTEL Ingestion", level: "h3" as const },
774
+ },
775
+ "ingestion-grid": {
776
+ key: "ingestion-grid",
777
+ type: "Grid" as const,
778
+ children: ["card-bytes", "card-requests"],
779
+ parentKey: "root",
780
+ props: { columns: 2, gap: "md" as const },
781
+ },
782
+ "card-bytes": {
783
+ key: "card-bytes",
784
+ type: "Card" as const,
785
+ children: ["stat-bytes"],
786
+ parentKey: "ingestion-grid",
787
+ props: {
788
+ title: "Total Bytes Ingested",
789
+ description: null,
790
+ padding: null,
791
+ },
792
+ },
793
+ "stat-bytes": {
794
+ key: "stat-bytes",
795
+ type: "MetricStat" as const,
796
+ children: [],
797
+ parentKey: "card-bytes",
798
+ dataSource: {
799
+ method: "searchMetricsPage" as const,
800
+ params: {
801
+ metricType: "Sum" as const,
802
+ metricName: "kopai.ingestion.bytes",
803
+ aggregate: "sum" as const,
804
+ },
805
+ refetchIntervalMs: 10_000,
806
+ },
807
+ props: { label: "Bytes", showSparkline: false },
808
+ },
809
+ "card-requests": {
810
+ key: "card-requests",
811
+ type: "Card" as const,
812
+ children: ["stat-requests"],
813
+ parentKey: "ingestion-grid",
814
+ props: {
815
+ title: "Total Requests",
816
+ description: null,
817
+ padding: null,
818
+ },
819
+ },
820
+ "stat-requests": {
821
+ key: "stat-requests",
822
+ type: "MetricStat" as const,
823
+ children: [],
824
+ parentKey: "card-requests",
825
+ dataSource: {
826
+ method: "searchMetricsPage" as const,
827
+ params: {
828
+ metricType: "Sum" as const,
829
+ metricName: "kopai.ingestion.requests",
830
+ aggregate: "sum" as const,
831
+ },
832
+ refetchIntervalMs: 10_000,
833
+ },
834
+ props: { label: "Requests", showSparkline: false },
835
+ },
836
+ "discovery-heading": {
837
+ key: "discovery-heading",
838
+ type: "Heading" as const,
839
+ children: [],
840
+ parentKey: "root",
841
+ props: { text: "Discovered Metrics", level: "h3" as const },
842
+ },
761
843
  description: {
762
844
  key: "description",
763
845
  type: "Text" as const,
@@ -7,6 +7,7 @@ export type KopaiClient = Pick<
7
7
  | "searchTracesPage"
8
8
  | "searchLogsPage"
9
9
  | "searchMetricsPage"
10
+ | "searchAggregatedMetrics"
10
11
  | "getTrace"
11
12
  | "discoverMetrics"
12
13
  | "getDashboard"