@odigos/ui-kit 0.0.286 → 0.0.287
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/CHANGELOG.md +7 -0
- package/docs/api-context.md +1 -1
- package/lib/chunks/helpers-CtkwQ3Wc.js +9 -0
- package/lib/chunks/index-BlYPxLja.js +311 -0
- package/lib/chunks/source-instrument-form-context-Bg6JzU76.js +5 -0
- package/lib/chunks/ui-components-CjgsN17j.js +1943 -0
- package/lib/components/_cards/data-card/index.d.ts +6 -1
- package/lib/components/_cards/text-card/index.d.ts +3 -0
- package/lib/components/button/index.d.ts +3 -1
- package/lib/components/drawer/header/index.d.ts +2 -0
- package/lib/components/drop-data/index.d.ts +4 -10
- package/lib/components/hover-actions/index.d.ts +1 -1
- package/lib/components/index.d.ts +4 -0
- package/lib/components/info-row/index.d.ts +11 -0
- package/lib/components/input/index.d.ts +2 -0
- package/lib/components/popup/index.d.ts +17 -0
- package/lib/components/select-window-hours/index.d.ts +17 -0
- package/lib/components/table/index.d.ts +10 -0
- package/lib/components/table/styled.d.ts +11 -0
- package/lib/components/table/table-rows/index.d.ts +6 -1
- package/lib/components/table/types.d.ts +11 -2
- package/lib/components/trace-view/index.d.ts +4 -0
- package/lib/components/trace-view/styled.d.ts +43 -0
- package/lib/components/trace-view/types.d.ts +46 -0
- package/lib/components.js +1 -1
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/instrumentation-rules/index.d.ts +2 -1
- package/lib/constants/strings/index.d.ts +14 -0
- package/lib/constants/url-templatization/index.d.ts +90 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_drawers/edit-source-drawer/pods/containers-card/process-card.d.ts +1 -7
- package/lib/containers/_drawers/index.d.ts +3 -0
- package/lib/containers/_drawers/url-templatization-custom-template-drawer/destination-step.d.ts +16 -0
- package/lib/containers/_drawers/url-templatization-custom-template-drawer/index.d.ts +18 -0
- package/lib/containers/_drawers/url-templatization-default-rule-drawer/index.d.ts +14 -0
- package/lib/containers/_drawers/url-templatization-template-view-drawer/index.d.ts +9 -0
- package/lib/containers/central-connections/helpers.d.ts +8 -0
- package/lib/containers/central-connections/index.d.ts +1 -0
- package/lib/containers/index.d.ts +2 -0
- package/lib/containers/insights/consts.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/animated-edge.d.ts +10 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/blast-radius-node.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/helpers.d.ts +28 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/index.d.ts +7 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/types.d.ts +19 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-trace-compare/helpers.d.ts +15 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-trace-compare/index.d.ts +7 -0
- package/lib/containers/insights/findings/drawer/anomaly/index.d.ts +16 -0
- package/lib/containers/insights/findings/drawer/anomaly/why-this-fired/index.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/helpers.d.ts +9 -0
- package/lib/containers/insights/findings/drawer/index.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/violation/index.d.ts +7 -0
- package/lib/containers/insights/findings/drawer/violation/violation-trace-view/index.d.ts +8 -0
- package/lib/containers/insights/findings/helpers.d.ts +57 -0
- package/lib/containers/insights/findings/index.d.ts +2 -0
- package/lib/containers/insights/findings/resolve-findings/index.d.ts +11 -0
- package/lib/containers/insights/index.d.ts +6 -0
- package/lib/containers/insights/insights-context.d.ts +44 -0
- package/lib/containers/insights/overview/contained-table-and-heading/index.d.ts +19 -0
- package/lib/containers/insights/overview/index.d.ts +6 -0
- package/lib/containers/insights/settings-and-configurations/constants.d.ts +16 -0
- package/lib/containers/insights/settings-and-configurations/content-panel/index.d.ts +11 -0
- package/lib/containers/insights/settings-and-configurations/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/menu-config.d.ts +24 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/constants.d.ts +40 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/create-override-panel.d.ts +14 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/mappers.d.ts +12 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/mock.d.ts +4 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/policies-menu.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/policy-editor.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/policy-list-item.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-levels.d.ts +15 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/constants.d.ts +16 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/default-catalog.d.ts +3 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/helpers.d.ts +30 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/index.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/signal-weights-panel.d.ts +13 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/signal-weights.d.ts +17 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/types.d.ts +29 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/constants.d.ts +35 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/create-panel.d.ts +13 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/edit-panel.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/facet-section.d.ts +14 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/guardrail-list-item.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/guardrails-menu.d.ts +9 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/mappers.d.ts +23 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/types.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/constants.d.ts +82 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/create-override-panel.d.ts +21 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/mappers.d.ts +38 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/policies-menu.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/policy-editor.d.ts +9 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/policy-list-item.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/types.d.ts +31 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/constants.d.ts +52 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/formatters.d.ts +5 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/layout.d.ts +18 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/mappers.d.ts +27 -0
- package/lib/containers/insights/settings-and-configurations/panels/system/constants.d.ts +31 -0
- package/lib/containers/insights/settings-and-configurations/panels/system/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/settings-menu/category-header.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/settings-menu/index.d.ts +7 -0
- package/lib/containers/insights/transactions/drawer/baselines/helpers.d.ts +16 -0
- package/lib/containers/insights/transactions/drawer/baselines/index.d.ts +5 -0
- package/lib/containers/insights/transactions/drawer/index.d.ts +2 -0
- package/lib/containers/insights/transactions/drawer/observations/helpers.d.ts +11 -0
- package/lib/containers/insights/transactions/drawer/observations/index.d.ts +5 -0
- package/lib/containers/insights/transactions/helpers.d.ts +34 -0
- package/lib/containers/insights/transactions/index.d.ts +2 -0
- package/lib/containers/url-templatization/converters.d.ts +43 -0
- package/lib/containers/url-templatization/custom-templates-list.d.ts +16 -0
- package/lib/containers/url-templatization/default-rules-list.d.ts +10 -0
- package/lib/containers/url-templatization/helpers.d.ts +17 -0
- package/lib/containers/url-templatization/index.d.ts +5 -0
- package/lib/containers/url-templatization/scope-summary.d.ts +8 -0
- package/lib/containers/url-templatization/template-path.d.ts +8 -0
- package/lib/containers.js +1862 -286
- package/lib/contexts/odigos-api/capabilities.d.ts +2 -0
- package/lib/contexts/odigos-api/hooks/use-insights-api.d.ts +156 -0
- package/lib/contexts/odigos-api/index.d.ts +2 -1
- package/lib/contexts/odigos-api/internal/notify.d.ts +4 -3
- package/lib/contexts/odigos-api/types.d.ts +206 -1
- package/lib/contexts/odigos-api/use-odigos-api.d.ts +2 -0
- package/lib/contexts/odigos-context.d.ts +3 -3
- package/lib/contexts.js +1 -1
- package/lib/functions/index.d.ts +1 -0
- package/lib/functions/parse-raw-otlp/index.d.ts +43 -0
- package/lib/functions.js +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/useAnchoredPopup.d.ts +44 -0
- package/lib/hooks/useCopy.d.ts +2 -3
- package/lib/hooks/useOnClickOutside.d.ts +1 -0
- package/lib/hooks/useTimeAgo.d.ts +4 -0
- package/lib/hooks.js +1 -1
- package/lib/icons/common/clock-icon/index.d.ts +2 -0
- package/lib/icons/common/index.d.ts +4 -0
- package/lib/icons/common/insights-findings-icon/index.d.ts +2 -0
- package/lib/icons/common/insights-transactions-icon/index.d.ts +2 -0
- package/lib/icons/common/threat-detection-icon/index.d.ts +2 -0
- package/lib/icons/overview/index.d.ts +2 -0
- package/lib/icons/overview/insights-icon/index.d.ts +2 -0
- package/lib/icons/overview/url-templatization-icon/index.d.ts +2 -0
- package/lib/icons.js +1 -1
- package/lib/snippets/actions/index.d.ts +8 -5
- package/lib/snippets/code-modal/index.d.ts +9 -0
- package/lib/snippets/index.d.ts +1 -0
- package/lib/snippets/trace-modal/index.d.ts +8 -0
- package/lib/snippets/upgrade-modal/index.d.ts +1 -1
- package/lib/snippets/wide-drawer/index.d.ts +6 -0
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme/palettes/index.d.ts +7 -1
- package/lib/theme.js +1 -1
- package/lib/types/actions/index.d.ts +12 -0
- package/lib/types/common/index.d.ts +9 -2
- package/lib/types/index.d.ts +1 -0
- package/lib/types/insights/index.d.ts +598 -0
- package/lib/types/instrumentation-rules/index.d.ts +1 -0
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/helpers-C5bkjRbO.js +0 -9
- package/lib/chunks/index-DBZ1mLhG.js +0 -298
- package/lib/chunks/source-instrument-form-context-CnRKQq6W.js +0 -5
- package/lib/chunks/ui-components-Ci-Vq1Dl.js +0 -1620
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Insights types — mirror of `frontend/graph/insights.graphqls`
|
|
3
|
+
* in the odigos OSS repo. Field names and enums match the GraphQL schema 1:1.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum InsightsEntityTypes {
|
|
6
|
+
Policy = "InsightsPolicy",
|
|
7
|
+
Finding = "Finding"
|
|
8
|
+
}
|
|
9
|
+
export declare enum InsightsTransactionKind {
|
|
10
|
+
HTTP = "HTTP",
|
|
11
|
+
GRPC = "GRPC",
|
|
12
|
+
CONSUMER = "CONSUMER",
|
|
13
|
+
PRODUCER = "PRODUCER",
|
|
14
|
+
CRON = "CRON",
|
|
15
|
+
INTERNAL = "INTERNAL"
|
|
16
|
+
}
|
|
17
|
+
export declare enum InsightsDeviationClass {
|
|
18
|
+
D1_call_edges = "D1_call_edges",
|
|
19
|
+
D2_egress = "D2_egress",
|
|
20
|
+
D3_latency = "D3_latency",
|
|
21
|
+
D4_args_returns = "D4_args_returns",
|
|
22
|
+
D5_libraries = "D5_libraries",
|
|
23
|
+
D6_attr_relations = "D6_attr_relations",
|
|
24
|
+
D7_db_access = "D7_db_access",
|
|
25
|
+
D8_payload_size = "D8_payload_size"
|
|
26
|
+
}
|
|
27
|
+
export declare enum InsightsSampleReason {
|
|
28
|
+
Example = "example",
|
|
29
|
+
AnomalyEvidence = "anomaly_evidence",
|
|
30
|
+
GuardrailEvidence = "guardrail_evidence"
|
|
31
|
+
}
|
|
32
|
+
export declare enum InsightsPolicyScope {
|
|
33
|
+
Global = "global",
|
|
34
|
+
Service = "service",
|
|
35
|
+
Transaction = "transaction"
|
|
36
|
+
}
|
|
37
|
+
export declare enum InsightsSeverity {
|
|
38
|
+
Info = "info",
|
|
39
|
+
Low = "low",
|
|
40
|
+
Medium = "medium",
|
|
41
|
+
High = "high",
|
|
42
|
+
Critical = "critical"
|
|
43
|
+
}
|
|
44
|
+
export declare enum InsightsFindingKind {
|
|
45
|
+
Anomaly = "anomaly",
|
|
46
|
+
Violation = "violation"
|
|
47
|
+
}
|
|
48
|
+
export declare enum InsightsAnomalyStatus {
|
|
49
|
+
Open = "open",
|
|
50
|
+
Baselined = "baselined",
|
|
51
|
+
Dismissed = "dismissed"
|
|
52
|
+
}
|
|
53
|
+
export declare enum InsightsViolationStatus {
|
|
54
|
+
Open = "open",
|
|
55
|
+
Allowed = "allowed",
|
|
56
|
+
Dismissed = "dismissed"
|
|
57
|
+
}
|
|
58
|
+
export declare enum InsightsRuleMode {
|
|
59
|
+
Suggest = "suggest",
|
|
60
|
+
Enforce = "enforce"
|
|
61
|
+
}
|
|
62
|
+
export declare enum InsightsAnomalyResolution {
|
|
63
|
+
Accept = "accept",
|
|
64
|
+
Dismiss = "dismiss",
|
|
65
|
+
Reopen = "reopen"
|
|
66
|
+
}
|
|
67
|
+
export declare enum InsightsBulkResolution {
|
|
68
|
+
Accept = "accept",
|
|
69
|
+
Dismiss = "dismiss"
|
|
70
|
+
}
|
|
71
|
+
export declare enum InsightsLearningMode {
|
|
72
|
+
All = "all",
|
|
73
|
+
Any = "any",
|
|
74
|
+
KOf = "k_of"
|
|
75
|
+
}
|
|
76
|
+
/** Coarse learning state for one baseline class (from GET …/baseline `learning.phase`). */
|
|
77
|
+
export declare enum InsightsBaselineLearningPhase {
|
|
78
|
+
Promoted = "promoted",
|
|
79
|
+
Empty = "empty",
|
|
80
|
+
Learning = "learning"
|
|
81
|
+
}
|
|
82
|
+
export declare enum InsightsLearningConditionType {
|
|
83
|
+
MinObservations = "min_observations",
|
|
84
|
+
MinDuration = "min_duration",
|
|
85
|
+
StableObservations = "stable_observations",
|
|
86
|
+
StableDuration = "stable_duration"
|
|
87
|
+
}
|
|
88
|
+
export declare enum InsightsStorageHealthStatus {
|
|
89
|
+
Healthy = "healthy",
|
|
90
|
+
Degraded = "degraded",
|
|
91
|
+
Critical = "critical",
|
|
92
|
+
Unreachable = "unreachable"
|
|
93
|
+
}
|
|
94
|
+
export declare enum InsightsStorageDiskStatus {
|
|
95
|
+
Ok = "ok",
|
|
96
|
+
Warning = "warning",
|
|
97
|
+
Critical = "critical"
|
|
98
|
+
}
|
|
99
|
+
export interface InsightsServiceStat {
|
|
100
|
+
namespace: string;
|
|
101
|
+
service: string;
|
|
102
|
+
transactionCount: number;
|
|
103
|
+
volume: number;
|
|
104
|
+
lastSeen: string;
|
|
105
|
+
}
|
|
106
|
+
export interface InsightsServiceProfile {
|
|
107
|
+
namespace: string;
|
|
108
|
+
service: string;
|
|
109
|
+
callers: string[];
|
|
110
|
+
callees: string[];
|
|
111
|
+
egress: string[];
|
|
112
|
+
}
|
|
113
|
+
export interface InsightsBlastRadiusNode {
|
|
114
|
+
/** Empty for synthetic hubs (e.g. `user`) and some virtual leaves. */
|
|
115
|
+
namespace: string;
|
|
116
|
+
service: string;
|
|
117
|
+
/** True for an uninstrumented dependency (database, queue, external API). */
|
|
118
|
+
isVirtual: boolean;
|
|
119
|
+
}
|
|
120
|
+
export interface InsightsBlastRadiusEdge {
|
|
121
|
+
clientNamespace?: string | null;
|
|
122
|
+
clientService: string;
|
|
123
|
+
serverNamespace?: string | null;
|
|
124
|
+
serverService: string;
|
|
125
|
+
connectionType: string;
|
|
126
|
+
requestCount: number;
|
|
127
|
+
failedCount: number;
|
|
128
|
+
lastSeen: string;
|
|
129
|
+
}
|
|
130
|
+
/** Neighborhood around an anchor service from the gateway servicegraph connector. */
|
|
131
|
+
export interface InsightsBlastRadiusSubgraph {
|
|
132
|
+
root: InsightsBlastRadiusNode;
|
|
133
|
+
nodes: InsightsBlastRadiusNode[];
|
|
134
|
+
edges: InsightsBlastRadiusEdge[];
|
|
135
|
+
}
|
|
136
|
+
export interface InsightsTransactionStat {
|
|
137
|
+
id: string;
|
|
138
|
+
service: string;
|
|
139
|
+
namespace: string;
|
|
140
|
+
operation: string;
|
|
141
|
+
kind: InsightsTransactionKind;
|
|
142
|
+
volume: number;
|
|
143
|
+
lastSeen: string;
|
|
144
|
+
hasBaseline?: boolean | null;
|
|
145
|
+
promoted?: boolean | null;
|
|
146
|
+
}
|
|
147
|
+
export interface InsightsTransaction {
|
|
148
|
+
id: string;
|
|
149
|
+
service: string;
|
|
150
|
+
namespace: string;
|
|
151
|
+
operation: string;
|
|
152
|
+
kind: InsightsTransactionKind;
|
|
153
|
+
}
|
|
154
|
+
/** One stability dimension (observations count, or duration in minutes). */
|
|
155
|
+
export interface InsightsBaselineStabilityProgress {
|
|
156
|
+
current: number;
|
|
157
|
+
target: number;
|
|
158
|
+
drivesPromotion: boolean;
|
|
159
|
+
met: boolean;
|
|
160
|
+
}
|
|
161
|
+
/** Both stability signals — always present for UI progress copy. */
|
|
162
|
+
export interface InsightsBaselineLearningStability {
|
|
163
|
+
observations: InsightsBaselineStabilityProgress;
|
|
164
|
+
duration: InsightsBaselineStabilityProgress;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Computed learning/stability snapshot against the resolved learning policy.
|
|
168
|
+
* Always present on baseline rows (including empty placeholders).
|
|
169
|
+
*/
|
|
170
|
+
export interface InsightsBaselineLearning {
|
|
171
|
+
phase: InsightsBaselineLearningPhase;
|
|
172
|
+
observationsSinceLastChange: number;
|
|
173
|
+
quietMinutes: number;
|
|
174
|
+
mode: InsightsLearningMode;
|
|
175
|
+
readyToPromote: boolean;
|
|
176
|
+
stability: InsightsBaselineLearningStability;
|
|
177
|
+
}
|
|
178
|
+
export interface InsightsBaselineClass {
|
|
179
|
+
transactionId: string;
|
|
180
|
+
class: InsightsDeviationClass;
|
|
181
|
+
/** JSON-encoded baseline data; shape varies per deviation class. */
|
|
182
|
+
data?: string | null;
|
|
183
|
+
dataSchemaVersion?: number | null;
|
|
184
|
+
observationCount: number;
|
|
185
|
+
promoted: boolean;
|
|
186
|
+
learningStartedAt?: string | null;
|
|
187
|
+
lastChangedAt?: string | null;
|
|
188
|
+
observationCountAtLastChange?: number | null;
|
|
189
|
+
learning: InsightsBaselineLearning;
|
|
190
|
+
}
|
|
191
|
+
export interface InsightsPromoteResult {
|
|
192
|
+
transactionId: string;
|
|
193
|
+
class: InsightsDeviationClass;
|
|
194
|
+
promoted: boolean;
|
|
195
|
+
}
|
|
196
|
+
export interface InsightsObservationSummary {
|
|
197
|
+
traceId: string;
|
|
198
|
+
transactionId: string;
|
|
199
|
+
observedAt: string;
|
|
200
|
+
durationMs: number;
|
|
201
|
+
sampleReason: InsightsSampleReason;
|
|
202
|
+
}
|
|
203
|
+
export interface InsightsObservation {
|
|
204
|
+
traceId: string;
|
|
205
|
+
transactionId: string;
|
|
206
|
+
observedAt: string;
|
|
207
|
+
durationMs: number;
|
|
208
|
+
sampleReason: InsightsSampleReason;
|
|
209
|
+
/** Base64-encoded OTLP protobuf; only on the single-observation query. */
|
|
210
|
+
rawOtlp: string;
|
|
211
|
+
}
|
|
212
|
+
export interface InsightsPolicy {
|
|
213
|
+
id: string;
|
|
214
|
+
name: string;
|
|
215
|
+
enabled: boolean;
|
|
216
|
+
fireAtScore: number;
|
|
217
|
+
/** JSON-encoded map[string]int of per-signal weights. */
|
|
218
|
+
signalWeights?: string | null;
|
|
219
|
+
/** JSON-encoded map[string][]string of enricher keyword lists. */
|
|
220
|
+
enricherLists?: string | null;
|
|
221
|
+
scope: InsightsPolicyScope;
|
|
222
|
+
scopeKey: string;
|
|
223
|
+
}
|
|
224
|
+
export interface InsightsPolicyInput {
|
|
225
|
+
/** Server-assigned; omit on create (the policy key is scope + scopeKey). */
|
|
226
|
+
id?: string | null;
|
|
227
|
+
name: string;
|
|
228
|
+
enabled: boolean;
|
|
229
|
+
fireAtScore: number;
|
|
230
|
+
signalWeights?: string | null;
|
|
231
|
+
enricherLists?: string | null;
|
|
232
|
+
scope: InsightsPolicyScope;
|
|
233
|
+
scopeKey: string;
|
|
234
|
+
}
|
|
235
|
+
export interface InsightsLearningCondition {
|
|
236
|
+
type: InsightsLearningConditionType;
|
|
237
|
+
minObservations?: number | null;
|
|
238
|
+
minDurationMinutes?: number | null;
|
|
239
|
+
stableObservations?: number | null;
|
|
240
|
+
stableMinutes?: number | null;
|
|
241
|
+
}
|
|
242
|
+
export interface InsightsLearningPolicy {
|
|
243
|
+
class: InsightsDeviationClass;
|
|
244
|
+
mode: InsightsLearningMode;
|
|
245
|
+
conditions?: InsightsLearningCondition[] | null;
|
|
246
|
+
minMatches?: number | null;
|
|
247
|
+
scope: InsightsPolicyScope;
|
|
248
|
+
scopeKey: string;
|
|
249
|
+
}
|
|
250
|
+
export interface InsightsLearningConditionInput {
|
|
251
|
+
type: InsightsLearningConditionType;
|
|
252
|
+
minObservations?: number | null;
|
|
253
|
+
minDurationMinutes?: number | null;
|
|
254
|
+
stableObservations?: number | null;
|
|
255
|
+
stableMinutes?: number | null;
|
|
256
|
+
}
|
|
257
|
+
export interface InsightsLearningPolicyInput {
|
|
258
|
+
class: InsightsDeviationClass;
|
|
259
|
+
mode: InsightsLearningMode;
|
|
260
|
+
conditions?: InsightsLearningConditionInput[] | null;
|
|
261
|
+
minMatches?: number | null;
|
|
262
|
+
scope: InsightsPolicyScope;
|
|
263
|
+
scopeKey: string;
|
|
264
|
+
}
|
|
265
|
+
export interface InsightsFinding {
|
|
266
|
+
kind: InsightsFindingKind;
|
|
267
|
+
service: string;
|
|
268
|
+
namespace: string;
|
|
269
|
+
title: string;
|
|
270
|
+
offending?: string | null;
|
|
271
|
+
score: number;
|
|
272
|
+
severity: InsightsSeverity;
|
|
273
|
+
occurrences: number;
|
|
274
|
+
lastSeen: string;
|
|
275
|
+
/** Union of anomaly statuses and violation statuses. */
|
|
276
|
+
status: InsightsViolationStatus | InsightsAnomalyStatus;
|
|
277
|
+
transactionId?: string | null;
|
|
278
|
+
signature?: string | null;
|
|
279
|
+
/** Anomaly signal classes; empty/absent for violations. */
|
|
280
|
+
triggeredClasses?: InsightsDeviationClass[] | null;
|
|
281
|
+
scopeKey?: string | null;
|
|
282
|
+
ruleKey?: string | null;
|
|
283
|
+
}
|
|
284
|
+
export interface InsightsRiskSignal {
|
|
285
|
+
source: string;
|
|
286
|
+
category: string;
|
|
287
|
+
weight: number;
|
|
288
|
+
confidence: number;
|
|
289
|
+
contribution: number;
|
|
290
|
+
rationale?: string | null;
|
|
291
|
+
mitre?: string | null;
|
|
292
|
+
owasp?: string | null;
|
|
293
|
+
}
|
|
294
|
+
export interface InsightsRiskAssessment {
|
|
295
|
+
score: number;
|
|
296
|
+
severity: InsightsSeverity;
|
|
297
|
+
correlated: boolean;
|
|
298
|
+
correlationBonus: number;
|
|
299
|
+
fireAtScore: number;
|
|
300
|
+
categories?: string[] | null;
|
|
301
|
+
signals: InsightsRiskSignal[];
|
|
302
|
+
}
|
|
303
|
+
export interface InsightsAnomalySummary {
|
|
304
|
+
transactionId: string;
|
|
305
|
+
signature: string;
|
|
306
|
+
service: string;
|
|
307
|
+
namespace: string;
|
|
308
|
+
operation?: string | null;
|
|
309
|
+
kind?: InsightsTransactionKind | null;
|
|
310
|
+
triggeredClasses: InsightsDeviationClass[];
|
|
311
|
+
offending?: string | null;
|
|
312
|
+
policyId?: string | null;
|
|
313
|
+
occurrences: number;
|
|
314
|
+
maxScore: number;
|
|
315
|
+
severity: InsightsSeverity;
|
|
316
|
+
firstSeen?: string | null;
|
|
317
|
+
lastSeen?: string | null;
|
|
318
|
+
lastTraceId?: string | null;
|
|
319
|
+
status: InsightsAnomalyStatus;
|
|
320
|
+
}
|
|
321
|
+
export declare enum InsightsAnomalyClassFindingKind {
|
|
322
|
+
Structural = "structural",
|
|
323
|
+
Metric = "metric"
|
|
324
|
+
}
|
|
325
|
+
export interface InsightsAnomalySpanHighlight {
|
|
326
|
+
spanId: string;
|
|
327
|
+
/** high | medium | low */
|
|
328
|
+
severity: string;
|
|
329
|
+
reason: string;
|
|
330
|
+
}
|
|
331
|
+
export interface InsightsAnomalyAttrHighlight {
|
|
332
|
+
spanId: string;
|
|
333
|
+
key: string;
|
|
334
|
+
value: string;
|
|
335
|
+
}
|
|
336
|
+
export interface InsightsAnomalyMetricComparison {
|
|
337
|
+
observed: number;
|
|
338
|
+
baseline: number;
|
|
339
|
+
/** us | bytes */
|
|
340
|
+
unit: string;
|
|
341
|
+
}
|
|
342
|
+
/** Render-ready explanation of one deviation class within an anomaly issue. */
|
|
343
|
+
export interface InsightsAnomalyClassFinding {
|
|
344
|
+
class: InsightsDeviationClass;
|
|
345
|
+
kind: InsightsAnomalyClassFindingKind;
|
|
346
|
+
title: string;
|
|
347
|
+
summary: string;
|
|
348
|
+
spanHighlights?: InsightsAnomalySpanHighlight[] | null;
|
|
349
|
+
attrHighlights?: InsightsAnomalyAttrHighlight[] | null;
|
|
350
|
+
metric?: InsightsAnomalyMetricComparison | null;
|
|
351
|
+
/** JSON-encoded original per-class evidence blob (fallback / debug). */
|
|
352
|
+
rawEvidence?: string | null;
|
|
353
|
+
}
|
|
354
|
+
export interface InsightsAnomalyIssue extends InsightsAnomalySummary {
|
|
355
|
+
/** JSON-encoded evidence keyed by deviation class. */
|
|
356
|
+
evidence: string;
|
|
357
|
+
risk?: InsightsRiskAssessment | null;
|
|
358
|
+
/** One render-ready finding per triggered class. Always present on detail. */
|
|
359
|
+
classFindings: InsightsAnomalyClassFinding[];
|
|
360
|
+
/** Evidence sample including rawOtlp. Omitted when no sample was retained. */
|
|
361
|
+
anomalyTrace?: InsightsObservation | null;
|
|
362
|
+
/** Learning-phase example sample including rawOtlp for baseline compare. */
|
|
363
|
+
baselineTrace?: InsightsObservation | null;
|
|
364
|
+
}
|
|
365
|
+
export interface InsightsAnomalyRefInput {
|
|
366
|
+
transactionId: string;
|
|
367
|
+
signature: string;
|
|
368
|
+
}
|
|
369
|
+
export interface InsightsBulkResolveResult {
|
|
370
|
+
resolution: string;
|
|
371
|
+
resolved: number;
|
|
372
|
+
}
|
|
373
|
+
export interface InsightsGuardrailRule {
|
|
374
|
+
key: string;
|
|
375
|
+
label: string;
|
|
376
|
+
mode: InsightsRuleMode;
|
|
377
|
+
allowlist?: string[] | null;
|
|
378
|
+
}
|
|
379
|
+
export interface InsightsGuardrail {
|
|
380
|
+
scope: InsightsPolicyScope;
|
|
381
|
+
/** Format: namespace/service. */
|
|
382
|
+
scopeKey: string;
|
|
383
|
+
rules: InsightsGuardrailRule[];
|
|
384
|
+
}
|
|
385
|
+
export interface InsightsGuardrailRuleInput {
|
|
386
|
+
key: string;
|
|
387
|
+
label: string;
|
|
388
|
+
mode: InsightsRuleMode;
|
|
389
|
+
allowlist?: string[] | null;
|
|
390
|
+
}
|
|
391
|
+
export interface InsightsGuardrailInput {
|
|
392
|
+
scope: InsightsPolicyScope;
|
|
393
|
+
scopeKey: string;
|
|
394
|
+
rules: InsightsGuardrailRuleInput[];
|
|
395
|
+
}
|
|
396
|
+
export interface InsightsGuardrailViolation {
|
|
397
|
+
service: string;
|
|
398
|
+
namespace: string;
|
|
399
|
+
scopeKey: string;
|
|
400
|
+
ruleKey: string;
|
|
401
|
+
ruleLabel: string;
|
|
402
|
+
offending?: string | null;
|
|
403
|
+
occurrences: number;
|
|
404
|
+
maxScore: number;
|
|
405
|
+
severity: InsightsSeverity;
|
|
406
|
+
lastSeen?: string | null;
|
|
407
|
+
status: InsightsViolationStatus;
|
|
408
|
+
}
|
|
409
|
+
/** Full violation for investigate — detail path only. */
|
|
410
|
+
export interface InsightsGuardrailViolationDetail extends InsightsGuardrailViolation {
|
|
411
|
+
offending: string;
|
|
412
|
+
/** One-line explanation of what broke (service, rule, offending). */
|
|
413
|
+
summary: string;
|
|
414
|
+
/** Spans on the evidence trace that witness the forbidden edge. */
|
|
415
|
+
spanHighlights?: InsightsAnomalySpanHighlight[] | null;
|
|
416
|
+
/** Captured sample including rawOtlp. Omitted when no sample was retained. */
|
|
417
|
+
evidenceTrace?: InsightsObservation | null;
|
|
418
|
+
}
|
|
419
|
+
export interface InsightsViolationActionInput {
|
|
420
|
+
scopeKey: string;
|
|
421
|
+
ruleKey: string;
|
|
422
|
+
offending: string;
|
|
423
|
+
}
|
|
424
|
+
export interface InsightsGuardrailSeedInput {
|
|
425
|
+
scopeKey: string;
|
|
426
|
+
mode?: InsightsRuleMode | null;
|
|
427
|
+
/** JSON-encoded map[string][]string; keys: allowed_callers | allowed_callees | allowed_egress. */
|
|
428
|
+
items: string;
|
|
429
|
+
}
|
|
430
|
+
export interface InsightsCatalogClass {
|
|
431
|
+
id: string;
|
|
432
|
+
label: string;
|
|
433
|
+
description?: string | null;
|
|
434
|
+
category: string;
|
|
435
|
+
categoryLabel?: string | null;
|
|
436
|
+
weight: number;
|
|
437
|
+
mitre?: string | null;
|
|
438
|
+
owasp?: string | null;
|
|
439
|
+
}
|
|
440
|
+
export interface InsightsEnricherList {
|
|
441
|
+
key: string;
|
|
442
|
+
label: string;
|
|
443
|
+
hint?: string | null;
|
|
444
|
+
default?: string[] | null;
|
|
445
|
+
}
|
|
446
|
+
export interface InsightsCatalogEnricher {
|
|
447
|
+
source: string;
|
|
448
|
+
parentClass: string;
|
|
449
|
+
category: string;
|
|
450
|
+
weight: number;
|
|
451
|
+
label: string;
|
|
452
|
+
description?: string | null;
|
|
453
|
+
list?: InsightsEnricherList | null;
|
|
454
|
+
}
|
|
455
|
+
export interface InsightsCatalogCategory {
|
|
456
|
+
id: string;
|
|
457
|
+
label: string;
|
|
458
|
+
base: number;
|
|
459
|
+
mitre?: string | null;
|
|
460
|
+
owasp?: string | null;
|
|
461
|
+
}
|
|
462
|
+
export interface InsightsCatalogGuardrailRule {
|
|
463
|
+
key: string;
|
|
464
|
+
label: string;
|
|
465
|
+
description?: string | null;
|
|
466
|
+
category: string;
|
|
467
|
+
weight: number;
|
|
468
|
+
hint?: string | null;
|
|
469
|
+
}
|
|
470
|
+
export interface InsightsSeverityBand {
|
|
471
|
+
severity: InsightsSeverity;
|
|
472
|
+
minScore: number;
|
|
473
|
+
}
|
|
474
|
+
export interface InsightsCatalog {
|
|
475
|
+
deviationClasses: InsightsCatalogClass[];
|
|
476
|
+
enrichers: InsightsCatalogEnricher[];
|
|
477
|
+
categories: InsightsCatalogCategory[];
|
|
478
|
+
guardrailRules: InsightsCatalogGuardrailRule[];
|
|
479
|
+
severityBands: InsightsSeverityBand[];
|
|
480
|
+
correlationBonus: number;
|
|
481
|
+
/** JSON-encoded map[string]string. */
|
|
482
|
+
tags: string;
|
|
483
|
+
}
|
|
484
|
+
export interface InsightsSystemSamplingSettings {
|
|
485
|
+
examplesPerTransaction: number;
|
|
486
|
+
exampleSampleIntervalSeconds: number;
|
|
487
|
+
}
|
|
488
|
+
export interface InsightsSystemRetentionSettings {
|
|
489
|
+
observationRetentionDays: number;
|
|
490
|
+
}
|
|
491
|
+
export interface InsightsSystemFindingsSettings {
|
|
492
|
+
defaultWindowHours: number;
|
|
493
|
+
maxWindowHours: number;
|
|
494
|
+
}
|
|
495
|
+
export interface InsightsSystemCapacitySettings {
|
|
496
|
+
maxResidentTransactions: number;
|
|
497
|
+
maxBaselineSetMembers: number;
|
|
498
|
+
}
|
|
499
|
+
export interface InsightsSystemWritebackSettings {
|
|
500
|
+
flushIntervalSeconds: number;
|
|
501
|
+
}
|
|
502
|
+
export interface InsightsSystemSettings {
|
|
503
|
+
sampling: InsightsSystemSamplingSettings;
|
|
504
|
+
retention: InsightsSystemRetentionSettings;
|
|
505
|
+
findings: InsightsSystemFindingsSettings;
|
|
506
|
+
capacity: InsightsSystemCapacitySettings;
|
|
507
|
+
writeback: InsightsSystemWritebackSettings;
|
|
508
|
+
}
|
|
509
|
+
export interface InsightsSystemSamplingSettingsInput {
|
|
510
|
+
examplesPerTransaction: number;
|
|
511
|
+
exampleSampleIntervalSeconds: number;
|
|
512
|
+
}
|
|
513
|
+
export interface InsightsSystemRetentionSettingsInput {
|
|
514
|
+
observationRetentionDays: number;
|
|
515
|
+
}
|
|
516
|
+
export interface InsightsSystemFindingsSettingsInput {
|
|
517
|
+
defaultWindowHours: number;
|
|
518
|
+
maxWindowHours: number;
|
|
519
|
+
}
|
|
520
|
+
export interface InsightsSystemCapacitySettingsInput {
|
|
521
|
+
maxResidentTransactions: number;
|
|
522
|
+
maxBaselineSetMembers: number;
|
|
523
|
+
}
|
|
524
|
+
export interface InsightsSystemWritebackSettingsInput {
|
|
525
|
+
flushIntervalSeconds: number;
|
|
526
|
+
}
|
|
527
|
+
export interface InsightsSystemSettingsInput {
|
|
528
|
+
sampling: InsightsSystemSamplingSettingsInput;
|
|
529
|
+
retention: InsightsSystemRetentionSettingsInput;
|
|
530
|
+
findings: InsightsSystemFindingsSettingsInput;
|
|
531
|
+
capacity: InsightsSystemCapacitySettingsInput;
|
|
532
|
+
writeback: InsightsSystemWritebackSettingsInput;
|
|
533
|
+
}
|
|
534
|
+
export interface InsightsStorageConnection {
|
|
535
|
+
reachable: boolean;
|
|
536
|
+
pingLatencyMs: number;
|
|
537
|
+
version: string;
|
|
538
|
+
database: string;
|
|
539
|
+
error?: string | null;
|
|
540
|
+
}
|
|
541
|
+
export interface InsightsStorageDisk {
|
|
542
|
+
insightsBytes: number;
|
|
543
|
+
totalBytes: number;
|
|
544
|
+
usedBytes: number;
|
|
545
|
+
availableBytes: number;
|
|
546
|
+
usedPercent: number;
|
|
547
|
+
status: InsightsStorageDiskStatus;
|
|
548
|
+
}
|
|
549
|
+
export interface InsightsStorageMemory {
|
|
550
|
+
processRssBytes: number;
|
|
551
|
+
cgroupUsedBytes: number;
|
|
552
|
+
/** 0 means no limit. */
|
|
553
|
+
cgroupTotalBytes: number;
|
|
554
|
+
uptimeSeconds: number;
|
|
555
|
+
}
|
|
556
|
+
export interface InsightsStorageQuery {
|
|
557
|
+
elapsedSeconds: number;
|
|
558
|
+
user: string;
|
|
559
|
+
memoryBytes: number;
|
|
560
|
+
query: string;
|
|
561
|
+
finishedAt?: string | null;
|
|
562
|
+
}
|
|
563
|
+
export interface InsightsStorageQueries {
|
|
564
|
+
active: number;
|
|
565
|
+
longestSeconds: number;
|
|
566
|
+
peakMemoryBytes: number;
|
|
567
|
+
items: InsightsStorageQuery[];
|
|
568
|
+
recentHeaviest: InsightsStorageQuery[];
|
|
569
|
+
recentLatest: InsightsStorageQuery[];
|
|
570
|
+
}
|
|
571
|
+
export interface InsightsStorageTable {
|
|
572
|
+
name: string;
|
|
573
|
+
rows: number;
|
|
574
|
+
bytesOnDisk: number;
|
|
575
|
+
activeParts: number;
|
|
576
|
+
}
|
|
577
|
+
export interface InsightsStorageWritePressure {
|
|
578
|
+
unfinishedMutations: number;
|
|
579
|
+
activeParts: number;
|
|
580
|
+
}
|
|
581
|
+
export interface InsightsStorageWriteback {
|
|
582
|
+
flushIntervalSeconds: number;
|
|
583
|
+
everFlushed: boolean;
|
|
584
|
+
lastFlushOk: boolean;
|
|
585
|
+
lastFlushAt?: string | null;
|
|
586
|
+
lastFlushError?: string | null;
|
|
587
|
+
}
|
|
588
|
+
export interface InsightsStorageHealth {
|
|
589
|
+
checkedAt: string;
|
|
590
|
+
status: InsightsStorageHealthStatus;
|
|
591
|
+
connection: InsightsStorageConnection;
|
|
592
|
+
disk: InsightsStorageDisk;
|
|
593
|
+
memory: InsightsStorageMemory;
|
|
594
|
+
queries: InsightsStorageQueries;
|
|
595
|
+
tables: InsightsStorageTable[];
|
|
596
|
+
writePressure: InsightsStorageWritePressure;
|
|
597
|
+
writeback: InsightsStorageWriteback;
|
|
598
|
+
}
|
|
@@ -6,6 +6,7 @@ export declare enum InstrumentationRuleType {
|
|
|
6
6
|
HeadersCollection = "HeadersCollection",
|
|
7
7
|
PayloadCollection = "PayloadCollection",
|
|
8
8
|
CustomInstrumentation = "CustomInstrumentation",
|
|
9
|
+
NetworkMetrics = "NetworkMetrics",
|
|
9
10
|
UnknownType = "UnknownType"
|
|
10
11
|
}
|
|
11
12
|
export interface InstrumentationRule {
|
package/lib/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{c7 as ActionCategoryTypes,bx as ActionKeyTypes,by as ActionType,hi as AgentInjectedReason,hj as BooleanOperation,cd as CloudConnectorFeatureKey,am as CodeAttributesKeyTypes,hk as ConditionType,bd as Crud,ag as CustomInstrumentationsKeyTypes,cP as DesiredConditionActionItemType,cs as DesiredStateProgress,hl as DestinationTypes,be as EntityTypes,bO as ExtractionDataFormat,p as FieldTypes,ai as GolangCustomProbe,ak as HeadersCollectionKeyTypes,J as InputTypes,hm as InsightsAnomalyClassFindingKind,g4 as InsightsAnomalyResolution,g0 as InsightsAnomalyStatus,gb as InsightsBaselineLearningPhase,g3 as InsightsBulkResolution,ge as InsightsDeviationClass,bm as InsightsEntityTypes,g1 as InsightsFindingKind,gh as InsightsLearningConditionType,gg as InsightsLearningMode,gf as InsightsPolicyScope,gi as InsightsRuleMode,gd as InsightsSampleReason,g2 as InsightsSeverity,gl as InsightsStorageDiskStatus,hn as InsightsStorageHealthStatus,ho as InsightsTransactionKind,f$ as InsightsViolationStatus,hp as InstallationMethod,hq as InstallationStatus,af as InstrumentationRuleType,hr as IntrumentationStatus,ah as JavaCustomProbe,hs as JsonOperation,bM as K8sAttributesFrom,bG as K8sResourceKind,ht as K8sWorkloadContainerAgentConfigTracesHeadSamplingSpanMetricsMode,hu as ListDirection,hv as NumberOperation,hw as OtelDistroName,hx as OtherEntityTypes,al as PayloadCollectionKeyTypes,aj as PhpCustomProbe,P as PlatformType,hy as PodContainerLifecycleStatus,hz as PodContainerStatus,hA as PodPhase,hB as Profile,_ as ProgrammingLanguages,c$ as RecommendationApplyExampleType,d0 as RecommendationRemediationType,c_ as RecommendationState,hC as RecommendationType,hD as SIGNAL_KEY_TO_TYPE,hE as SIGNAL_TYPE_TO_KEY,hF as SignalKey,bD as SignalType,hG as SortDirection,S as StatusType,hH as StringOperation,b as Tier,hI as WorkloadRolloutReason,gH as WorkloadRolloutStatus}from"./chunks/ui-components-CjgsN17j.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|
package/lib/visuals.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{hJ as VISUAL_ODIGOS_LOGO_HEIGHT,hK as VISUAL_ODIGOS_LOGO_WIDTH,V as VisualGreenRings,hL as VisualOdigosLogo,eW as VisualPurpleRings}from"./chunks/ui-components-CjgsN17j.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{Fragment as n,useMemo as o,useContext as a,createContext as s}from"react";import{T as i,t as u,b as l,P as c}from"./ui-components-Ci-Vq1Dl.js";import p from"styled-components";var d;(e=>{e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"})(d||(d={}));const f=[d.Action,d.Endpoint,d.Scope,d.Duration],h=p.span`
|
|
2
|
-
font-family: ${({theme:e,$isMono:t})=>t?e.font_family.secondary:e.font_family.primary};
|
|
3
|
-
font-size: ${({theme:e})=>e.v2.text.size.xxs}px;
|
|
4
|
-
line-height: 20px;
|
|
5
|
-
color: ${({theme:e,$variant:t})=>{const r=e.v2.colors;switch(t){case"action":return r.green[400];case"endpoint":return r.purple[300];case"scope":return r.yellow[400];case"duration":return r.orange[600];default:return r.white[500]}}};
|
|
6
|
-
`,m=p.span`
|
|
7
|
-
text-decoration: underline dotted;
|
|
8
|
-
text-underline-offset: 3px;
|
|
9
|
-
`,v=({parts:o})=>{const a=o.map(e=>({...e,text:e.text.trim()})).filter(e=>e.text.length>0);return e(t,{children:a.map((o,a)=>{const s=e(h,{$variant:o.variant,$isMono:f.includes(o.variant),children:o.text});return r(n,{children:[0!==a&&e(t,{children:" "}),o.tooltipItems?.length?e(i,{text:o.tooltipItems,inline:!0,maxWidth:"300px",children:e(m,{children:s})}):s]},`${o.variant}-${a}`)})})};function g(){return{sources:[],namespaces:[],languages:[]}}function y(e){return!e||!e.sources?.length&&!e.namespaces?.length&&!e.languages?.length}function x(e){return e?{sources:e.sources?[...e.sources]:[],namespaces:e.namespaces?[...e.namespaces]:[],languages:e.languages?[...e.languages]:[]}:{sources:[],namespaces:[],languages:[]}}function k(e){return null==e||0===e}function T(e){return{name:"",notes:"",disabled:!1,ruleType:"Relevance",sourceScopes:{sources:[],namespaces:[],languages:[]},operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:"",durationPreset:"500",customDurationMs:"",keepErrors:!1,percentageMode:"costReduction"===e?"sample":"all",percentagePreset:"0",customPercentage:""}}function A(e){return y(e.sourceScopes)?null:e.sourceScopes}function S(e){return A(e)}function R(e){if("all"===e.percentageMode)return null;if("custom"===e.percentagePreset){const t=parseFloat(e.customPercentage);return isNaN(t)?null:t}return parseFloat(e.percentagePreset)}function P(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function b(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function D(e){return"all"===e.operationType?null:"httpServer"===e.operationType?b(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function I(e){return"all"===e.operationType?null:"httpServer"===e.operationType?b(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function M(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:A(e),percentageAtMost:R(e),operation:D(e)}}function C(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:A(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?P(e):null,percentageAtLeast:R(e),operation:I(e)}}function $(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:A(e),percentageAtMost:R(e)??0,operation:I(e)}}function E(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:S(e),operation:D(e),percentageAtMost:R(e),notes:e.notes||null}}function w(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:S(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?P(e):null,operation:I(e),percentageAtLeast:R(e),notes:e.notes||null}}function L(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:S(e),operation:I(e),percentageAtMost:R(e)??0,notes:e.notes||null}}const N=["5000","1000","500","100","50"],O=["50","25","10","1","0.5","0.1","0"];function H(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=O.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function K(e){if(!e)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};const t=e;return t.httpServer?{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}:t.kafkaConsumer?{operationType:"kafkaConsumer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaConsumer.kafkaTopic||""}:t.kafkaProducer?{operationType:"kafkaProducer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaProducer.kafkaTopic||""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}function j(e){const t=T(),r=x(e.rule.sourceScopes),n=(e=>"highlyRelevant"!==e.category?"Relevance":e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance")(e);let o,a,s={durationPreset:"500",customDurationMs:""},i=!1;switch(e.category){case"noisy":o=(e=>{const t=e.rule.operation;return t?t.httpServer?{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}:t.httpClient?{operationType:"httpClient",routeType:t.httpClient.templatedPathPrefix?"routePrefix":"route",route:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||"",serverAddress:t.httpClient.serverAddress||"",method:t.httpClient.method||"",kafkaTopic:""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}})(e),a=k(u=e.rule.percentageAtMost)?{percentageMode:"all",percentagePreset:"0",customPercentage:""}:H(u);break;case"highlyRelevant":o=K(e.rule.operation),a=H(e.rule.percentageAtLeast),s=(e=>{if(null==e)return{durationPreset:"500",customDurationMs:""};const t=N.find(t=>Number(t)===e);return t?{durationPreset:t,customDurationMs:""}:{durationPreset:"custom",customDurationMs:String(e)}})(e.rule.durationAtLeastMs),i=e.rule.error;break;case"costReduction":o=K(e.rule.operation),a=H(e.rule.percentageAtMost)}var u;return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:n,sourceScopes:r,...o,...s,keepErrors:i,...a}}const z=s({platformType:c.K8s,tier:l.Community,version:"v0.0.0"}),F=({children:t,platformType:r,tier:n,version:a})=>{const s=o(()=>({platformType:r,tier:n,version:a}),[r,n,a]);return e(z.Provider,{value:s,children:t})},J=(e,t)=>null==e?0:"number"==typeof e?e:t?e[t]??0:0,V=(e,t,r)=>{const n=J(t,r);return!n||u(e)>=u(n)},B=e=>{const t=a(z),r=J(e,t.platformType),n=V(t.version,r),o=t.platformType===c.K8s,s=t.platformType===c.Vm,i=t.platformType===c.Connector,u=t.platformType===c.AwsEcs;return{...t,isVersionSupported:n,minSupportedVersion:r,isK8s:o,isVm:s,isConnector:i,isAwsEcs:u,isEnterprise:t.tier===l.Onprem}};var W;(e=>{e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"})(W||(W={}));const _=[{value:W.Noisy,label:"1. Noisy Operations",tooltip:"Rules that reduce noise from high-volume, low-value operations"},{value:W.HighlyRelevant,label:"2. Highly Relevant Operations",tooltip:"Rules that prioritize important traces for retention"},{value:W.CostReduction,label:"3. Cost Reduction",tooltip:"Rules that optimize costs by sampling less critical data"}],q={[W.Noisy]:"This is the most efficient way to sample (with Head Sampling). Prefer to use it where possible.",[W.HighlyRelevant]:'Any trace from the "Noisy Operations" category is sampled prior to checking highly relevance.',[W.CostReduction]:"Cost reduction rules use Tail Sampling to drop traces that are unlikely to be useful for debugging or monitoring."},G={[W.Noisy]:"Noisy Operations rules list",[W.HighlyRelevant]:"Highly Relevant Operations rules list",[W.CostReduction]:"Cost Reduction rules list"},Q={[W.Noisy]:"noisy",[W.HighlyRelevant]:"highlyRelevant",[W.CostReduction]:"costReduction"},U={noisy:W.Noisy,highlyRelevant:W.HighlyRelevant,costReduction:W.CostReduction};function X(e){const t=e.kind?String(e.kind).toLowerCase():"deployment";return e.namespace&&e.name?`${t} '${e.name}' in namespace '${e.namespace}'`:e.name?`${t} '${e.name}'`:e.namespace?`any service in namespace '${e.namespace}'`:""}function Y(e){return`any service in namespace '${e}'`}function Z(e){return`${e} services`}function ee(e,t="global"){const r=(e=>{if(!e)return[];const t=[];for(const r of e.sources??[]){const e=X(r);e&&t.push(e)}for(const r of e.namespaces??[])r&&t.push(Y(r));for(const r of e.languages??[])r&&t.push(Z(r));return t})(e);if(!r.length)return"source"===t?[]:[{text:" in ",variant:d.Default},{text:"any service in the cluster",variant:d.Scope}];const n=[{text:" in ",variant:d.Default}],o=r.slice(0,2),a=r.slice(2);return o.forEach((e,t)=>{t>0&&n.push({text:", ",variant:d.Default}),n.push({text:e,variant:d.Scope})}),a.length>0&&n.push({text:` + ${a.length} more`,variant:d.Default,tooltipItems:a}),n}function te(e,t){const r=(n=e).startsWith("/")?n.slice(1):n;var n;return t?`${t} /${r}`:`/${r}`}function re(e){const t=e.method;return e.route?[{text:" for server endpoint ",variant:d.Default},{text:te(e.route,t),variant:d.Endpoint}]:e.routePrefix?[{text:" for endpoints under ",variant:d.Default},{text:te(e.routePrefix,t),variant:d.Endpoint}]:[]}function ne(e,t="global"){const r=[];if(k(e.percentageAtMost)?r.push({text:"Drop all traces",variant:d.Action}):(r.push({text:`Keep at most ${e.percentageAtMost}%`,variant:d.Action}),r.push({text:" of traces",variant:d.Default})),e.operation){const t=e.operation.httpServer,n=t?(e=>{const t=e.method;return e.route?[{text:" where the root span is ",variant:d.Default},{text:te(e.route,t),variant:d.Endpoint}]:e.routePrefix?[{text:" where the root span is under ",variant:d.Default},{text:te(e.routePrefix,t),variant:d.Endpoint}]:[]})(t):[];n.length>0&&r.push(...n);const o=e.operation.httpClient,a=o?.templatedPath||o?.templatedPathPrefix,s=o?.serverAddress;if((a||s)&&0===n.length){const e=o?.method;if(r.push({text:" to ",variant:d.Default}),a){const t=te(a,e);s&&(r.push({text:"server address ",variant:d.Default}),r.push({text:s,variant:d.Endpoint}),r.push({text:" ",variant:d.Default})),r.push({text:t,variant:d.Endpoint})}else s&&(r.push({text:"server address ",variant:d.Default}),r.push({text:s,variant:d.Endpoint}))}}else r.push({text:" on ",variant:d.Default}),r.push({text:"any operation",variant:d.Endpoint});return r.push(...ee(e.sourceScopes,t)),r}function oe(e,t="global"){const r=[];if(null!=e.percentageAtLeast?(r.push({text:`Keep ${e.percentageAtLeast}%`,variant:d.Action}),r.push({text:" of traces",variant:d.Default})):r.push({text:"Keep all traces",variant:d.Action}),e.operation){const t=e.operation.httpServer;t&&r.push(...re(t))}else r.push({text:" on ",variant:d.Default}),r.push({text:"any operation",variant:d.Endpoint});return r.push(...ee(e.sourceScopes,t)),!e.error&&null!=e.durationAtLeastMs&&e.durationAtLeastMs>0&&(r.push({text:" with duration > ",variant:d.Default}),r.push({text:`${e.durationAtLeastMs}ms`,variant:d.Duration})),r}function ae(e,t="global"){const r=[];if(r.push({text:`Keep at most ${e.percentageAtMost}%`,variant:d.Action}),r.push({text:" of traces",variant:d.Default}),e.operation){const t=e.operation.httpServer,n=t?re(t):[];n.length>0&&r.push(...n);const o=e.operation.kafkaConsumer?.kafkaTopic;o&&0===n.length&&(r.push({text:" from ",variant:d.Default}),r.push({text:`topic '${o}'`,variant:d.Endpoint}))}else r.push({text:" on ",variant:d.Default}),r.push({text:"any operation",variant:d.Endpoint});return r.push(...ee(e.sourceScopes,t)),r}function se(e){return e.error?"Error":null!=e.durationAtLeastMs?"Duration":"Relevance"}function ie(e,t,r){const n=Q[t],o=[];for(const a of e)switch(t){case W.Noisy:for(const e of a.noisyOperations)r?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:a.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:ne(e),category:n});break;case W.HighlyRelevant:for(const e of a.highlyRelevantOperations)r?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:a.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:oe(e),category:n,typeBadge:se(e)});break;case W.CostReduction:for(const e of a.costReductionRules)r?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:a.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:ae(e),category:n})}return o}function ue(e,t){switch(e){case"noisy":return ne(t);case"highlyRelevant":return oe(t);case"costReduction":return ae(t)}}function le(e,t,r,n){for(const o of e)if(o.id===t)switch(n){case"noisy":{const e=o.noisyOperations.find(e=>e.ruleId===r);if(e)return{category:"noisy",samplingId:o.id,rule:e};break}case"highlyRelevant":{const e=o.highlyRelevantOperations.find(e=>e.ruleId===r);if(e)return{category:"highlyRelevant",samplingId:o.id,rule:e};break}case"costReduction":{const e=o.costReductionRules.find(e=>e.ruleId===r);if(e)return{category:"costReduction",samplingId:o.id,rule:e};break}}return null}function ce(e,t){const r=le(e,t.samplingId,t.rule.ruleId,t.category);return r?{...r,summary:ue(r.category,r.rule)}:null}function pe(e,t){const r=le(e,t.samplingId,t.ruleId,t.category);return r?{...r,summary:ue(r.category,r.rule)}:null}function de(e,t,r){for(const n of e){const o=le(e,n.id,t,r);if(o)return{...o,summary:ue(o.category,o.rule)}}return null}function fe(e){if(!e)return null;const t=(e.sources??[]).map(e=>`${e.namespace}/${e.kind}/${e.name}`).sort(),r=(e.namespaces??[]).slice().sort(),n=(e.languages??[]).slice().sort();return t.length||r.length||n.length?[t.join("|"),r.join("|"),n.join("|")].join("::"):null}function he(e){return null==e?null:e}function me(e,t){return JSON.stringify({sourceScopes:fe(e),operation:he(t)})}function ve(e,t,r,n){return JSON.stringify({sourceScopes:fe(e),error:t??!1,durationAtLeastMs:(o=r,null==o?null:o),operation:he(n)});var o}function ge(e,t){return JSON.stringify({sourceScopes:fe(e),operation:he(t)})}function ye(e,t,r,n){switch(t){case"noisy":{const t=me(r.sourceScopes,r.operation);for(const r of e)for(const e of r.noisyOperations)if((!n||e.ruleId!==n)&&me(e.sourceScopes,e.operation)===t)return e.ruleId;return null}case"highlyRelevant":{const t=ve(r.sourceScopes,r.error,r.durationAtLeastMs,r.operation);for(const r of e)for(const e of r.highlyRelevantOperations)if((!n||e.ruleId!==n)&&ve(e.sourceScopes,e.error,e.durationAtLeastMs,e.operation)===t)return e.ruleId;return null}case"costReduction":{const t=ge(r.sourceScopes,r.operation);for(const r of e)for(const e of r.costReductionRules)if((!n||e.ruleId!==n)&&ge(e.sourceScopes,e.operation)===t)return e.ruleId;return null}}}function xe(e){return e&&e.enabled?[{text:`Keep ${e.keepPercentage??0}%`,variant:d.Action},{text:" of ",variant:d.Default},{text:"traces for kubelet health probes in the entire cluster",variant:d.Scope}]:[{text:"Auto rule is ",variant:d.Default},{text:"disabled",variant:d.Action}]}function ke(e){return!0===e.error&&y(e.sourceScopes)&&!e.operation&&(null==e.percentageAtLeast||100===e.percentageAtLeast)}function Te(e){for(const t of e){const e=t.highlyRelevantOperations.find(ke);if(e)return{rule:e,samplingId:t.id}}return null}function Ae(e){return!e||e.disabled?[{text:"Auto rule is ",variant:d.Default},{text:"disabled",variant:d.Action}]:[{text:"Keep all traces",variant:d.Action},{text:" of ",variant:d.Default},{text:"error traces across the entire cluster",variant:d.Scope}]}function Se(e){return y(e.sourceScopes)&&!e.operation}function Re(e){for(const t of e){const e=t.costReductionRules.find(Se);if(e)return{rule:e,samplingId:t.id}}return null}function Pe(e){return!e||e.disabled?[{text:" is ",variant:d.Default},{text:"disabled",variant:d.Action}]:[{text:`Keep at most ${e.percentageAtMost}%`,variant:d.Action},{text:" of ",variant:d.Default},{text:"traces across the entire cluster",variant:d.Scope}]}export{w as A,E as B,v as C,pe as D,ue as E,Q as F,ye as G,_ as H,q as I,G as J,F as O,U as R,W as S,d as a,ee as b,V as c,k as d,ae as e,oe as f,ne as g,$ as h,y as i,C as j,M as k,Ae as l,g as m,x as n,Pe as o,xe as p,T as q,J as r,de as s,Te as t,B as u,j as v,Re as w,ce as x,ie as y,L as z};
|