@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.
- package/dist/index.cjs +187 -8
- package/dist/index.d.cts +20 -13
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +20 -12
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +187 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
- package/src/components/observability/DynamicDashboard/DynamicDashboard.test.tsx +175 -1
- package/src/components/observability/MetricStat/index.tsx +12 -4
- package/src/components/observability/renderers/OtelMetricStat.tsx +40 -0
- package/src/components/observability/renderers/OtelTraceDetail.tsx +88 -2
- package/src/hooks/use-kopai-data.test.ts +31 -0
- package/src/hooks/use-kopai-data.ts +12 -5
- package/src/hooks/use-live-logs.test.ts +1 -0
- package/src/lib/__snapshots__/generate-prompt-instructions.test.ts.snap +1 -1
- package/src/lib/renderer.test.tsx +2 -0
- package/src/pages/observability.test.tsx +3 -0
- package/src/pages/observability.tsx +83 -1
- package/src/providers/kopai-provider.tsx +1 -0
|
@@ -743,7 +743,14 @@ const METRICS_TREE = {
|
|
|
743
743
|
root: {
|
|
744
744
|
key: "root",
|
|
745
745
|
type: "Stack" as const,
|
|
746
|
-
children: [
|
|
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,
|