@odigos/ui-kit 0.0.285 → 0.0.286-dev.520
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-C5bkjRbO.js → helpers-B0SJ6hqm.js} +2 -2
- package/lib/chunks/index-9H2LDuOq.js +311 -0
- package/lib/chunks/source-instrument-form-context-BF70uJ_R.js +5 -0
- package/lib/chunks/ui-components-DqG0z5U0.js +1878 -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/drawer/header/index.d.ts +2 -0
- package/lib/components/hover-actions/index.d.ts +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/info-row/index.d.ts +11 -0
- package/lib/components/input/index.d.ts +2 -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.js +1 -1
- package/lib/containers/_drawers/edit-source-drawer/overview/runtime-card.d.ts +5 -2
- package/lib/containers/_drawers/edit-source-drawer/pods/containers-card/process-card.d.ts +1 -7
- package/lib/containers/index.d.ts +1 -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 +15 -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 +11 -0
- package/lib/containers/insights/findings/drawer/index.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/violation/index.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/violation/violation-trace-view/index.d.ts +8 -0
- package/lib/containers/insights/findings/helpers.d.ts +47 -0
- package/lib/containers/insights/findings/index.d.ts +2 -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 +18 -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 +17 -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 +13 -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 +18 -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 +35 -0
- package/lib/containers/insights/transactions/index.d.ts +2 -0
- package/lib/containers.js +1381 -261
- package/lib/contexts/odigos-api/capabilities.d.ts +2 -0
- package/lib/contexts/odigos-api/hooks/use-insights-api.d.ts +153 -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 +201 -1
- package/lib/contexts/odigos-api/use-odigos-api.d.ts +2 -0
- 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/useCopy.d.ts +2 -3
- package/lib/hooks/useTimeAgo.d.ts +4 -0
- package/lib/hooks.js +1 -1
- package/lib/icons/common/index.d.ts +3 -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 +1 -0
- package/lib/icons/overview/insights-icon/index.d.ts +2 -0
- package/lib/icons.js +1 -1
- 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.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/common/index.d.ts +2 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/insights/index.d.ts +598 -0
- package/lib/types/workload/index.d.ts +14 -0
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- 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
|
@@ -40,6 +40,8 @@ export interface Capabilities {
|
|
|
40
40
|
canFetchProfiling: boolean;
|
|
41
41
|
canFetchCollectorInfo: boolean;
|
|
42
42
|
canManageSamplingRules: boolean;
|
|
43
|
+
canManageInsightsPolicies: boolean;
|
|
44
|
+
canFetchInsights: boolean;
|
|
43
45
|
canManageRecommendations: boolean;
|
|
44
46
|
}
|
|
45
47
|
export declare const deriveCapabilities: (operations: OdigosApiOperations, ctx: OperationContext) => Capabilities;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `useInsightsApi` — Insights reads + mutations.
|
|
3
|
+
*
|
|
4
|
+
* Reactive reads are exposed as `use…()` sub-hooks that each own a
|
|
5
|
+
* `useApiQuery('GET_INSIGHTS_…')`. Calling the sub-hook IS the subscription —
|
|
6
|
+
* containers that only mutate never call them and never fire the list queries.
|
|
7
|
+
* Mutations call `runMutation` and then refetch the relevant list(s).
|
|
8
|
+
*
|
|
9
|
+
* Slot `TData` is the bare kit shape (after host `transformResult` unwraps
|
|
10
|
+
* the `{ insights: { … } }` / mutation-root wire envelope).
|
|
11
|
+
*/
|
|
12
|
+
import { type UseApiQueryOptions, type UseApiQueryResult } from '../use-api-query';
|
|
13
|
+
import type { GetInsightsAnomaliesVars, GetInsightsAnomalyVars, GetInsightsBaselineVars, GetInsightsFindingsVars, GetInsightsGuardrailViolationsVars, GetInsightsGuardrailViolationVars, GetInsightsServiceProfileVars, GetInsightsBlastRadiusVars, GetInsightsObservationVars, GetInsightsObservationsVars, GetInsightsTransactionVars, GetInsightsTransactionsVars, OperationContext, OdigosApiOperations, PromoteInsightsBaselineClassVars, ResolveInsightsAnomalyVars } from '../types';
|
|
14
|
+
import type { InsightsAnomalyIssue, InsightsAnomalySummary, InsightsBaselineClass, InsightsBulkResolveResult, InsightsCatalog, InsightsFinding, InsightsGuardrail, InsightsGuardrailViolation, InsightsGuardrailViolationDetail, InsightsLearningPolicy, InsightsLearningPolicyInput, InsightsObservation, InsightsObservationSummary, InsightsPolicy, InsightsPolicyInput, InsightsPromoteResult, InsightsServiceStat, InsightsServiceProfile, InsightsBlastRadiusSubgraph, InsightsStorageHealth, InsightsSystemSettings, InsightsSystemSettingsInput, InsightsTransaction, InsightsTransactionStat, InsightsViolationActionInput, InsightsGuardrailInput, InsightsGuardrailSeedInput, InsightsDeviationClass, InsightsBulkResolution, InsightsPolicyScope, InsightsAnomalyRefInput } from '../../../types';
|
|
15
|
+
export interface InsightsApi {
|
|
16
|
+
useServices: (options?: UseApiQueryOptions<InsightsServiceStat[]>) => UseApiQueryResult<InsightsServiceStat[]>;
|
|
17
|
+
useTransactions: (vars?: GetInsightsTransactionsVars, options?: UseApiQueryOptions<InsightsTransactionStat[]>) => UseApiQueryResult<InsightsTransactionStat[]>;
|
|
18
|
+
useTransaction: (vars: GetInsightsTransactionVars, options?: UseApiQueryOptions<InsightsTransaction | undefined>) => UseApiQueryResult<InsightsTransaction | undefined>;
|
|
19
|
+
useBaseline: (vars: GetInsightsBaselineVars, options?: UseApiQueryOptions<InsightsBaselineClass[]>) => UseApiQueryResult<InsightsBaselineClass[]>;
|
|
20
|
+
useObservations: (vars: GetInsightsObservationsVars, options?: UseApiQueryOptions<InsightsObservationSummary[]>) => UseApiQueryResult<InsightsObservationSummary[]>;
|
|
21
|
+
useObservation: (vars: GetInsightsObservationVars, options?: UseApiQueryOptions<InsightsObservation | undefined>) => UseApiQueryResult<InsightsObservation | undefined>;
|
|
22
|
+
useFindings: (vars?: GetInsightsFindingsVars, options?: UseApiQueryOptions<InsightsFinding[]>) => UseApiQueryResult<InsightsFinding[]>;
|
|
23
|
+
useAnomalies: (vars?: GetInsightsAnomaliesVars, options?: UseApiQueryOptions<InsightsAnomalySummary[]>) => UseApiQueryResult<InsightsAnomalySummary[]>;
|
|
24
|
+
useAnomaly: (vars: GetInsightsAnomalyVars, options?: UseApiQueryOptions<InsightsAnomalyIssue | undefined>) => UseApiQueryResult<InsightsAnomalyIssue | undefined>;
|
|
25
|
+
usePolicies: (options?: UseApiQueryOptions<InsightsPolicy[]>) => UseApiQueryResult<InsightsPolicy[]>;
|
|
26
|
+
useLearningPolicies: (options?: UseApiQueryOptions<InsightsLearningPolicy[]>) => UseApiQueryResult<InsightsLearningPolicy[]>;
|
|
27
|
+
useGuardrails: (options?: UseApiQueryOptions<InsightsGuardrail[]>) => UseApiQueryResult<InsightsGuardrail[]>;
|
|
28
|
+
useGuardrailViolations: (vars?: GetInsightsGuardrailViolationsVars, options?: UseApiQueryOptions<InsightsGuardrailViolation[]>) => UseApiQueryResult<InsightsGuardrailViolation[]>;
|
|
29
|
+
useGuardrailViolation: (vars: GetInsightsGuardrailViolationVars, options?: UseApiQueryOptions<InsightsGuardrailViolationDetail | undefined>) => UseApiQueryResult<InsightsGuardrailViolationDetail | undefined>;
|
|
30
|
+
useServiceProfile: (vars: GetInsightsServiceProfileVars, options?: UseApiQueryOptions<InsightsServiceProfile | undefined>) => UseApiQueryResult<InsightsServiceProfile | undefined>;
|
|
31
|
+
useBlastRadius: (vars: GetInsightsBlastRadiusVars, options?: UseApiQueryOptions<InsightsBlastRadiusSubgraph | undefined>) => UseApiQueryResult<InsightsBlastRadiusSubgraph | undefined>;
|
|
32
|
+
useCatalog: (options?: UseApiQueryOptions<InsightsCatalog>) => UseApiQueryResult<InsightsCatalog>;
|
|
33
|
+
useSystemSettings: (options?: UseApiQueryOptions<InsightsSystemSettings>) => UseApiQueryResult<InsightsSystemSettings>;
|
|
34
|
+
useStorageHealth: (options?: UseApiQueryOptions<InsightsStorageHealth>) => UseApiQueryResult<InsightsStorageHealth>;
|
|
35
|
+
getServices?: () => Promise<{
|
|
36
|
+
data?: InsightsServiceStat[];
|
|
37
|
+
error?: string;
|
|
38
|
+
}>;
|
|
39
|
+
getTransactions?: (vars?: GetInsightsTransactionsVars) => Promise<{
|
|
40
|
+
data?: InsightsTransactionStat[];
|
|
41
|
+
error?: string;
|
|
42
|
+
}>;
|
|
43
|
+
getTransaction?: (vars: GetInsightsTransactionVars) => Promise<{
|
|
44
|
+
data?: InsightsTransaction;
|
|
45
|
+
error?: string;
|
|
46
|
+
}>;
|
|
47
|
+
getFindings?: (vars?: GetInsightsFindingsVars) => Promise<{
|
|
48
|
+
data?: InsightsFinding[];
|
|
49
|
+
error?: string;
|
|
50
|
+
}>;
|
|
51
|
+
getAnomalies?: (vars?: GetInsightsAnomaliesVars) => Promise<{
|
|
52
|
+
data?: InsightsAnomalySummary[];
|
|
53
|
+
error?: string;
|
|
54
|
+
}>;
|
|
55
|
+
getAnomaly?: (vars: GetInsightsAnomalyVars) => Promise<{
|
|
56
|
+
data?: InsightsAnomalyIssue;
|
|
57
|
+
error?: string;
|
|
58
|
+
}>;
|
|
59
|
+
getPolicies?: () => Promise<{
|
|
60
|
+
data?: InsightsPolicy[];
|
|
61
|
+
error?: string;
|
|
62
|
+
}>;
|
|
63
|
+
getLearningPolicies?: () => Promise<{
|
|
64
|
+
data?: InsightsLearningPolicy[];
|
|
65
|
+
error?: string;
|
|
66
|
+
}>;
|
|
67
|
+
getGuardrails?: () => Promise<{
|
|
68
|
+
data?: InsightsGuardrail[];
|
|
69
|
+
error?: string;
|
|
70
|
+
}>;
|
|
71
|
+
getGuardrailViolation?: (vars: GetInsightsGuardrailViolationVars) => Promise<{
|
|
72
|
+
data?: InsightsGuardrailViolationDetail;
|
|
73
|
+
error?: string;
|
|
74
|
+
}>;
|
|
75
|
+
getServiceProfile?: (vars: GetInsightsServiceProfileVars) => Promise<{
|
|
76
|
+
data?: InsightsServiceProfile;
|
|
77
|
+
error?: string;
|
|
78
|
+
}>;
|
|
79
|
+
getBlastRadius?: (vars: GetInsightsBlastRadiusVars) => Promise<{
|
|
80
|
+
data?: InsightsBlastRadiusSubgraph;
|
|
81
|
+
error?: string;
|
|
82
|
+
}>;
|
|
83
|
+
getCatalog?: () => Promise<{
|
|
84
|
+
data?: InsightsCatalog;
|
|
85
|
+
error?: string;
|
|
86
|
+
}>;
|
|
87
|
+
getSystemSettings?: () => Promise<{
|
|
88
|
+
data?: InsightsSystemSettings;
|
|
89
|
+
error?: string;
|
|
90
|
+
}>;
|
|
91
|
+
getStorageHealth?: () => Promise<{
|
|
92
|
+
data?: InsightsStorageHealth;
|
|
93
|
+
error?: string;
|
|
94
|
+
}>;
|
|
95
|
+
promoteBaselineClass?: (vars: PromoteInsightsBaselineClassVars) => Promise<{
|
|
96
|
+
data?: InsightsPromoteResult;
|
|
97
|
+
error?: string;
|
|
98
|
+
} | undefined>;
|
|
99
|
+
resetBaselineClass?: (transactionId: string, deviationClass: InsightsDeviationClass) => Promise<{
|
|
100
|
+
error?: string;
|
|
101
|
+
} | undefined>;
|
|
102
|
+
resetTransactionBaselines?: (transactionId: string) => Promise<{
|
|
103
|
+
error?: string;
|
|
104
|
+
} | undefined>;
|
|
105
|
+
deleteTransaction?: (transactionId: string) => Promise<{
|
|
106
|
+
error?: string;
|
|
107
|
+
} | undefined>;
|
|
108
|
+
upsertPolicy?: (policy: InsightsPolicyInput) => Promise<{
|
|
109
|
+
data?: InsightsPolicy;
|
|
110
|
+
error?: string;
|
|
111
|
+
} | undefined>;
|
|
112
|
+
deletePolicy?: (scope: InsightsPolicyScope, scopeKey: string) => Promise<{
|
|
113
|
+
error?: string;
|
|
114
|
+
} | undefined>;
|
|
115
|
+
upsertLearningPolicy?: (policy: InsightsLearningPolicyInput) => Promise<{
|
|
116
|
+
data?: InsightsLearningPolicy;
|
|
117
|
+
error?: string;
|
|
118
|
+
} | undefined>;
|
|
119
|
+
deleteLearningPolicy?: (deviationClass: InsightsDeviationClass, scope: InsightsPolicyScope, scopeKey: string) => Promise<{
|
|
120
|
+
error?: string;
|
|
121
|
+
} | undefined>;
|
|
122
|
+
resolveAnomaly?: (vars: ResolveInsightsAnomalyVars) => Promise<{
|
|
123
|
+
error?: string;
|
|
124
|
+
} | undefined>;
|
|
125
|
+
bulkResolveAnomalies?: (resolution: InsightsBulkResolution, items: InsightsAnomalyRefInput[]) => Promise<{
|
|
126
|
+
data?: InsightsBulkResolveResult;
|
|
127
|
+
error?: string;
|
|
128
|
+
} | undefined>;
|
|
129
|
+
upsertGuardrail?: (guardrail: InsightsGuardrailInput) => Promise<{
|
|
130
|
+
data?: InsightsGuardrail;
|
|
131
|
+
error?: string;
|
|
132
|
+
} | undefined>;
|
|
133
|
+
deleteGuardrail?: (scopeKey: string) => Promise<{
|
|
134
|
+
error?: string;
|
|
135
|
+
} | undefined>;
|
|
136
|
+
seedGuardrail?: (seed: InsightsGuardrailSeedInput) => Promise<{
|
|
137
|
+
error?: string;
|
|
138
|
+
} | undefined>;
|
|
139
|
+
allowViolation?: (action: InsightsViolationActionInput) => Promise<{
|
|
140
|
+
error?: string;
|
|
141
|
+
} | undefined>;
|
|
142
|
+
dismissViolation?: (action: InsightsViolationActionInput) => Promise<{
|
|
143
|
+
error?: string;
|
|
144
|
+
} | undefined>;
|
|
145
|
+
reopenViolation?: (action: InsightsViolationActionInput) => Promise<{
|
|
146
|
+
error?: string;
|
|
147
|
+
} | undefined>;
|
|
148
|
+
updateSystemSettings?: (settings: InsightsSystemSettingsInput) => Promise<{
|
|
149
|
+
data?: InsightsSystemSettings;
|
|
150
|
+
error?: string;
|
|
151
|
+
} | undefined>;
|
|
152
|
+
}
|
|
153
|
+
export declare const useInsightsApi: (operations: OdigosApiOperations, ctx: OperationContext) => InsightsApi;
|
|
@@ -15,7 +15,7 @@ export { useApiQuery, useApiLazyQuery, useApiMutation } from './use-api-query';
|
|
|
15
15
|
export { useApiForConnections, type ApiForConnections } from './use-api-for-connections';
|
|
16
16
|
export type { UseApiQueryOptions, UseApiQueryResult, UseApiLazyQueryResult, UseApiMutationOptions, UseApiMutationResult, UseApiMutationTuple } from './use-api-query';
|
|
17
17
|
export { pickByPlatform, versionedDocument, vmDialectMap, type VersionedDocumentMap } from './platform-helpers';
|
|
18
|
-
export type { ApolloConfig, ApplyRecommendationRemediationResult, ApplyRecommendationRemediationVars, CreateActionResult, CreateActionVars, CreateCostReductionRuleResult, CreateDataStreamResult, CreateDataStreamVars, CreateDestinationResult, CreateDestinationVars, CreateHighlyRelevantOperationRuleResult, CreateInstrumentationRuleResult, CreateInstrumentationRuleVars, CreateNoisyOperationRuleResult, DeleteActionResult, DeleteActionVars, DeleteCostReductionRuleResult, DeleteDataStreamResult, DeleteDataStreamVars, DeleteDestinationResult, DeleteDestinationVars, DeleteHighlyRelevantOperationRuleResult, DeleteInstrumentationRuleResult, DeleteInstrumentationRuleVars, DeleteNoisyOperationRuleResult, DescribeOdigosData, DescribeSourceData, DestinationWireInput, DiagnoseResult, DiagnoseVars, GetActionsData, GetAllClusterSnapshotsData, GetClusterSnapshotData, GetClusterSnapshotVars, GetCollectorPodInfoData, GetCollectorPodInfoVars, GetConfigYamlsData, GetDataStreamsData, GetDestinationsData, GetEffectiveConfigVars, GetGatewayInfoData, GetGatewayPodsData, GetInstrumentationRulesData, GetK8sManifestData, GetK8sManifestVars, GetMetricsData, GetNamespacesWithWorkloadsData, GetNodeCollectorInfoData, GetNodeCollectorPodsData, GetPeerSourcesVars, GetProfilingSlotsData, GetRecommendationsData, GetSamplingRulesData, GetServiceMapData, GetSourceLibrariesData, GetSourceLibrariesVars, GetSourceProfilingData, GetTokensData, GetWorkloadsByIdsData, GetWorkloadsByIdsVars, GetWorkloadsData, GetWorkloadsVars, MultiFetchGroup, MultiFetchResponse, MultiFetchResult, OdigosApiOperations, OdigosApiProviderProps, Operation, OperationContext, PersistNamespacesResult, PersistNamespacesVars, PersistSourcesResult, PersistSourcesVars, RecoverFromRollbackVars, ResetLocalUiConfigResult, RestartPodVars, RestartWorkloadsVars, SamplingConfigInputWire, SamplingK8sHealthConfigInput, SamplingK8sHealthConfigVars, SamplingRuleCreateVars, SamplingRuleDeleteVars, SamplingRuleUpdateVars, SetRecommendationDismissedResult, TestDestinationConnectionVars, UpdateActionResult, UpdateActionVars, UpdateCostReductionRuleResult, UpdateDataStreamResult, UpdateDataStreamVars, UpdateDestinationData, UpdateDestinationVars, UpdateHighlyRelevantOperationRuleResult, UpdateInstrumentationRuleResult, UpdateInstrumentationRuleVars, UpdateLocalUiConfigResult, UpdateLocalUiConfigVars, UpdateLocalUiSamplingConfigResult, UpdateLocalUiSamplingConfigVars, UpdateNoisyOperationRuleResult, UpdateRemoteConfigResult, UpdateRemoteConfigVars, UpdateSourceVars, UpdateTokenResult, UpdateTokenVars, } from './types';
|
|
18
|
+
export type { ApolloConfig, ApplyRecommendationRemediationResult, ApplyRecommendationRemediationVars, CreateActionResult, CreateActionVars, CreateCostReductionRuleResult, CreateDataStreamResult, CreateDataStreamVars, CreateDestinationResult, CreateDestinationVars, CreateHighlyRelevantOperationRuleResult, CreateInstrumentationRuleResult, CreateInstrumentationRuleVars, CreateNoisyOperationRuleResult, DeleteActionResult, DeleteActionVars, DeleteCostReductionRuleResult, DeleteDataStreamResult, DeleteDataStreamVars, DeleteDestinationResult, DeleteDestinationVars, DeleteHighlyRelevantOperationRuleResult, DeleteInstrumentationRuleResult, DeleteInstrumentationRuleVars, DeleteNoisyOperationRuleResult, DescribeOdigosData, DescribeSourceData, DestinationWireInput, DiagnoseResult, DiagnoseVars, GetActionsData, GetAllClusterSnapshotsData, GetClusterSnapshotData, GetClusterSnapshotVars, GetCollectorPodInfoData, GetCollectorPodInfoVars, GetConfigYamlsData, GetDataStreamsData, GetDestinationsData, GetEffectiveConfigVars, GetGatewayInfoData, GetGatewayPodsData, GetInstrumentationRulesData, GetK8sManifestData, GetK8sManifestVars, GetMetricsData, GetNamespacesWithWorkloadsData, GetNodeCollectorInfoData, GetNodeCollectorPodsData, GetPeerSourcesVars, GetProfilingSlotsData, GetRecommendationsData, GetSamplingRulesData, GetServiceMapData, GetSourceLibrariesData, GetSourceLibrariesVars, GetSourceProfilingData, GetTokensData, GetWorkloadsByIdsData, GetWorkloadsByIdsVars, GetWorkloadsData, GetWorkloadsVars, GetInsightsTransactionsVars, GetInsightsTransactionVars, GetInsightsBaselineVars, GetInsightsObservationsVars, GetInsightsObservationVars, GetInsightsFindingsVars, GetInsightsAnomaliesVars, GetInsightsAnomalyVars, GetInsightsGuardrailViolationsVars, GetInsightsGuardrailViolationVars, GetInsightsServiceProfileVars, GetInsightsBlastRadiusVars, PromoteInsightsBaselineClassVars, ResetInsightsBaselineClassVars, ResetInsightsTransactionBaselinesVars, DeleteInsightsTransactionVars, UpsertInsightsPolicyVars, DeleteInsightsPolicyVars, UpsertInsightsLearningPolicyVars, DeleteInsightsLearningPolicyVars, ResolveInsightsAnomalyVars, BulkResolveInsightsAnomaliesVars, UpsertInsightsGuardrailVars, DeleteInsightsGuardrailVars, SeedInsightsGuardrailVars, InsightsViolationActionVars, UpdateInsightsSystemSettingsVars, MultiFetchGroup, MultiFetchResponse, MultiFetchResult, OdigosApiOperations, OdigosApiProviderProps, Operation, OperationContext, PersistNamespacesResult, PersistNamespacesVars, PersistSourcesResult, PersistSourcesVars, RecoverFromRollbackVars, ResetLocalUiConfigResult, RestartPodVars, RestartWorkloadsVars, SamplingConfigInputWire, SamplingK8sHealthConfigInput, SamplingK8sHealthConfigVars, SamplingRuleCreateVars, SamplingRuleDeleteVars, SamplingRuleUpdateVars, SetRecommendationDismissedResult, TestDestinationConnectionVars, UpdateActionResult, UpdateActionVars, UpdateCostReductionRuleResult, UpdateDataStreamResult, UpdateDataStreamVars, UpdateDestinationData, UpdateDestinationVars, UpdateHighlyRelevantOperationRuleResult, UpdateInstrumentationRuleResult, UpdateInstrumentationRuleVars, UpdateLocalUiConfigResult, UpdateLocalUiConfigVars, UpdateLocalUiSamplingConfigResult, UpdateLocalUiSamplingConfigVars, UpdateNoisyOperationRuleResult, UpdateRemoteConfigResult, UpdateRemoteConfigVars, UpdateSourceVars, UpdateTokenResult, UpdateTokenVars, } from './types';
|
|
19
19
|
export type { Capabilities } from './capabilities';
|
|
20
20
|
export type { ConfigApi } from './hooks/use-config-api';
|
|
21
21
|
export type { TokensApi } from './hooks/use-tokens-api';
|
|
@@ -34,4 +34,5 @@ export type { K8sManifestApi } from './hooks/use-k8s-manifest-api';
|
|
|
34
34
|
export type { DestinationsApi } from './hooks/use-destinations-api';
|
|
35
35
|
export type { SourcesApi, PersistSourceInput } from './hooks/use-sources-api';
|
|
36
36
|
export type { InstrumentationRulesApi } from './hooks/use-instrumentation-rules-api';
|
|
37
|
+
export type { InsightsApi } from './hooks/use-insights-api';
|
|
37
38
|
export { prepareSourcePayloads, prepareNamespacePayloads, type SourceInstrumentInput, type NamespaceInstrumentInput, type SourceInstrumentInputItem, type NamespaceInstrumentInputItem, } from './internal/source-payloads';
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
* pre-wired. This replaces the `notifyError = (title, message, target?) => …`
|
|
8
8
|
* boilerplate that every hook used to repeat.
|
|
9
9
|
*/
|
|
10
|
+
import { StatusType, type EntityTypes, type InsightsEntityTypes, type OtherEntityTypes, type WorkloadId } from '../../../types';
|
|
10
11
|
import type { NotifyPayload } from '../../../store';
|
|
11
|
-
import { StatusType, type EntityTypes, type WorkloadId } from '../../../types';
|
|
12
12
|
type AddNotification = (notif: NotifyPayload) => void;
|
|
13
|
+
type NotifyEntityType = EntityTypes | OtherEntityTypes | InsightsEntityTypes;
|
|
13
14
|
export interface DomainNotifier {
|
|
14
15
|
/** Generic dispatcher — used for non-success/error/pending paths. */
|
|
15
16
|
notify: (type: StatusType, title: string, message: string, target?: string | WorkloadId, hideFromHistory?: boolean) => void;
|
|
@@ -32,11 +33,11 @@ export interface DomainNotifier {
|
|
|
32
33
|
notifyReadonly: () => undefined;
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
|
-
* Returns a domain-bound notifier. Pass the
|
|
36
|
+
* Returns a domain-bound notifier. Pass the entity type for the domain
|
|
36
37
|
* (e.g. `EntityTypes.Source`) and every dispatched toast is tagged with
|
|
37
38
|
* the correct `crdType` and SSE-target translation.
|
|
38
39
|
*/
|
|
39
|
-
export declare const useNotify: (entityType:
|
|
40
|
+
export declare const useNotify: (entityType: NotifyEntityType) => DomainNotifier;
|
|
40
41
|
/**
|
|
41
42
|
* Standalone form of the readonly notification, used by the small number
|
|
42
43
|
* of hooks that don't need the full `useNotify` surface (e.g. data-streams,
|
|
@@ -18,7 +18,7 @@ import type { ReactNode } from 'react';
|
|
|
18
18
|
import type { DocumentNode } from '@apollo/client';
|
|
19
19
|
import type { InstrumentationRuleInputWire } from '../../functions/instrumentation-rule-source-scopes';
|
|
20
20
|
import type { ApolloClient, ApolloLink, FetchPolicy, MutationFetchPolicy, TypePolicies, WatchQueryFetchPolicy } from '@apollo/client';
|
|
21
|
-
import type { Action, ActionFormData, AllClusterSnapshots, ClusterSnapshot, ConfigYaml, CostReductionRule, CostReductionRuleInput, DataStream, DescribeOdigos, DescribeSource, Destination, DestinationFormData, DiagnoseFormData, EffectiveConfig, EffectiveConfigInput, EnableProfilingResult, ExtendedPodInfo, FetchedConfig, GatewayInfo, GetActionTypesResult, GetInstrumentationRuleTypesResult, GetDestinationCategoriesResult, GetPotentialDestinationsResult, GetProfileHotFunctionsVars, HighlyRelevantOperationRule, HighlyRelevantOperationRuleInput, HotFunctionsResult, InstrumentationRule, K8sResourceKind, LocalUiConfigInput, Metrics, Namespace, NoisyOperationRule, NoisyOperationRuleInput, NodeCollectoInfo, PlatformType, PodInfo, ProfilingSlots, SourceProfilingVars, Recommendation, RecommendationRemediationType, RecommendationType, SamplingRules, SamplingRulesK8sHealthConfig, ServiceMapSources, SourceFormData, SourceProfilingResult, TestConnectionResponse, Tier, TokenPayload, Workload, WorkloadId, PeerSources } from '../../types';
|
|
21
|
+
import type { Action, ActionFormData, AllClusterSnapshots, ClusterSnapshot, ConfigYaml, CostReductionRule, CostReductionRuleInput, DataStream, DescribeOdigos, DescribeSource, Destination, DestinationFormData, DiagnoseFormData, EffectiveConfig, EffectiveConfigInput, EnableProfilingResult, ExtendedPodInfo, FetchedConfig, GatewayInfo, GetActionTypesResult, GetInstrumentationRuleTypesResult, GetDestinationCategoriesResult, GetPotentialDestinationsResult, GetProfileHotFunctionsVars, HighlyRelevantOperationRule, HighlyRelevantOperationRuleInput, HotFunctionsResult, InsightsAnomalyIssue, InsightsAnomalyRefInput, InsightsAnomalyResolution, InsightsAnomalySummary, InsightsBaselineClass, InsightsBulkResolution, InsightsBulkResolveResult, InsightsCatalog, InsightsDeviationClass, InsightsFinding, InsightsFindingKind, InsightsGuardrail, InsightsGuardrailInput, InsightsGuardrailSeedInput, InsightsGuardrailViolation, InsightsGuardrailViolationDetail, InsightsLearningPolicy, InsightsLearningPolicyInput, InsightsObservation, InsightsObservationSummary, InsightsPolicy, InsightsPolicyInput, InsightsPolicyScope, InsightsPromoteResult, InsightsSampleReason, InsightsServiceStat, InsightsServiceProfile, InsightsBlastRadiusSubgraph, InsightsStorageHealth, InsightsSystemSettings, InsightsSystemSettingsInput, InsightsTransaction, InsightsTransactionKind, InsightsTransactionStat, InsightsViolationActionInput, InstrumentationRule, K8sResourceKind, LocalUiConfigInput, Metrics, Namespace, NoisyOperationRule, NoisyOperationRuleInput, NodeCollectoInfo, PlatformType, PodInfo, ProfilingSlots, SourceProfilingVars, Recommendation, RecommendationRemediationType, RecommendationType, SamplingRules, SamplingRulesK8sHealthConfig, ServiceMapSources, SourceFormData, SourceProfilingResult, TestConnectionResponse, Tier, TokenPayload, Workload, WorkloadId, PeerSources } from '../../types';
|
|
22
22
|
/**
|
|
23
23
|
* The execution context for a given operation, propagated through every
|
|
24
24
|
* `Operation.document(ctx)` / `transformVariables(vars, ctx)` /
|
|
@@ -537,6 +537,13 @@ export interface GetSamplingRulesData {
|
|
|
537
537
|
k8sHealthProbesConfig?: SamplingRulesK8sHealthConfig;
|
|
538
538
|
};
|
|
539
539
|
}
|
|
540
|
+
export interface UpsertInsightsPolicyVars {
|
|
541
|
+
policy: InsightsPolicyInput;
|
|
542
|
+
}
|
|
543
|
+
export interface DeleteInsightsPolicyVars {
|
|
544
|
+
scope: InsightsPolicyScope;
|
|
545
|
+
scopeKey: string;
|
|
546
|
+
}
|
|
540
547
|
export interface SamplingRuleCreateVars<TInput> {
|
|
541
548
|
samplingId: string;
|
|
542
549
|
rule: TInput;
|
|
@@ -597,6 +604,115 @@ export interface GetAllClusterSnapshotsData {
|
|
|
597
604
|
export interface GetClusterSnapshotData {
|
|
598
605
|
clusterSnapshot?: ClusterSnapshot;
|
|
599
606
|
}
|
|
607
|
+
export interface GetInsightsTransactionsVars {
|
|
608
|
+
namespace?: string | null;
|
|
609
|
+
service?: string | null;
|
|
610
|
+
kind?: InsightsTransactionKind | null;
|
|
611
|
+
}
|
|
612
|
+
export interface GetInsightsTransactionVars {
|
|
613
|
+
id: string;
|
|
614
|
+
}
|
|
615
|
+
export interface GetInsightsBaselineVars {
|
|
616
|
+
transactionId: string;
|
|
617
|
+
}
|
|
618
|
+
export interface GetInsightsObservationsVars {
|
|
619
|
+
transactionId: string;
|
|
620
|
+
sampleReason?: InsightsSampleReason | null;
|
|
621
|
+
}
|
|
622
|
+
export interface GetInsightsObservationVars {
|
|
623
|
+
transactionId: string;
|
|
624
|
+
traceId: string;
|
|
625
|
+
}
|
|
626
|
+
export interface GetInsightsFindingsVars {
|
|
627
|
+
windowHours?: number | null;
|
|
628
|
+
service?: string | null;
|
|
629
|
+
namespace?: string | null;
|
|
630
|
+
status?: string | null;
|
|
631
|
+
kind?: InsightsFindingKind | null;
|
|
632
|
+
}
|
|
633
|
+
export interface GetInsightsAnomaliesVars {
|
|
634
|
+
windowHours?: number | null;
|
|
635
|
+
service?: string | null;
|
|
636
|
+
namespace?: string | null;
|
|
637
|
+
status?: string | null;
|
|
638
|
+
}
|
|
639
|
+
export interface GetInsightsAnomalyVars {
|
|
640
|
+
transactionId: string;
|
|
641
|
+
signature: string;
|
|
642
|
+
}
|
|
643
|
+
export interface GetInsightsGuardrailViolationsVars {
|
|
644
|
+
windowHours?: number | null;
|
|
645
|
+
service?: string | null;
|
|
646
|
+
namespace?: string | null;
|
|
647
|
+
status?: string | null;
|
|
648
|
+
}
|
|
649
|
+
export interface GetInsightsGuardrailViolationVars {
|
|
650
|
+
scopeKey: string;
|
|
651
|
+
ruleKey: string;
|
|
652
|
+
offending: string;
|
|
653
|
+
}
|
|
654
|
+
export interface GetInsightsServiceProfileVars {
|
|
655
|
+
namespace?: string | null;
|
|
656
|
+
service: string;
|
|
657
|
+
}
|
|
658
|
+
export interface GetInsightsBlastRadiusVars {
|
|
659
|
+
namespace?: string | null;
|
|
660
|
+
service: string;
|
|
661
|
+
depth?: number | null;
|
|
662
|
+
}
|
|
663
|
+
export interface PromoteInsightsBaselineClassVars {
|
|
664
|
+
transactionId: string;
|
|
665
|
+
class: InsightsDeviationClass;
|
|
666
|
+
}
|
|
667
|
+
export interface ResetInsightsBaselineClassVars {
|
|
668
|
+
transactionId: string;
|
|
669
|
+
class: InsightsDeviationClass;
|
|
670
|
+
}
|
|
671
|
+
export interface ResetInsightsTransactionBaselinesVars {
|
|
672
|
+
transactionId: string;
|
|
673
|
+
}
|
|
674
|
+
export interface DeleteInsightsTransactionVars {
|
|
675
|
+
transactionId: string;
|
|
676
|
+
}
|
|
677
|
+
export interface UpsertInsightsPolicyVars {
|
|
678
|
+
policy: InsightsPolicyInput;
|
|
679
|
+
}
|
|
680
|
+
export interface DeleteInsightsPolicyVars {
|
|
681
|
+
scope: InsightsPolicyScope;
|
|
682
|
+
scopeKey: string;
|
|
683
|
+
}
|
|
684
|
+
export interface UpsertInsightsLearningPolicyVars {
|
|
685
|
+
policy: InsightsLearningPolicyInput;
|
|
686
|
+
}
|
|
687
|
+
export interface DeleteInsightsLearningPolicyVars {
|
|
688
|
+
class: InsightsDeviationClass;
|
|
689
|
+
scope: InsightsPolicyScope;
|
|
690
|
+
scopeKey: string;
|
|
691
|
+
}
|
|
692
|
+
export interface ResolveInsightsAnomalyVars {
|
|
693
|
+
transactionId: string;
|
|
694
|
+
signature: string;
|
|
695
|
+
resolution: InsightsAnomalyResolution;
|
|
696
|
+
}
|
|
697
|
+
export interface BulkResolveInsightsAnomaliesVars {
|
|
698
|
+
resolution: InsightsBulkResolution;
|
|
699
|
+
items: InsightsAnomalyRefInput[];
|
|
700
|
+
}
|
|
701
|
+
export interface UpsertInsightsGuardrailVars {
|
|
702
|
+
guardrail: InsightsGuardrailInput;
|
|
703
|
+
}
|
|
704
|
+
export interface DeleteInsightsGuardrailVars {
|
|
705
|
+
scopeKey: string;
|
|
706
|
+
}
|
|
707
|
+
export interface SeedInsightsGuardrailVars {
|
|
708
|
+
seed: InsightsGuardrailSeedInput;
|
|
709
|
+
}
|
|
710
|
+
export interface InsightsViolationActionVars {
|
|
711
|
+
action: InsightsViolationActionInput;
|
|
712
|
+
}
|
|
713
|
+
export interface UpdateInsightsSystemSettingsVars {
|
|
714
|
+
settings: InsightsSystemSettingsInput;
|
|
715
|
+
}
|
|
600
716
|
export interface PersistSourcesResult {
|
|
601
717
|
persistK8sSources: boolean;
|
|
602
718
|
}
|
|
@@ -678,6 +794,54 @@ export interface DeleteCostReductionRuleResult {
|
|
|
678
794
|
export interface UpdateLocalUiSamplingConfigResult {
|
|
679
795
|
updateLocalUiSamplingConfig: boolean;
|
|
680
796
|
}
|
|
797
|
+
export interface PromoteInsightsBaselineClassResult {
|
|
798
|
+
promoteInsightsBaselineClass: InsightsPromoteResult;
|
|
799
|
+
}
|
|
800
|
+
export interface ResetInsightsBaselineClassResult {
|
|
801
|
+
resetInsightsBaselineClass: boolean;
|
|
802
|
+
}
|
|
803
|
+
export interface ResetInsightsTransactionBaselinesResult {
|
|
804
|
+
resetInsightsTransactionBaselines: boolean;
|
|
805
|
+
}
|
|
806
|
+
export interface UpsertInsightsPolicyResult {
|
|
807
|
+
upsertInsightsPolicy: InsightsPolicy;
|
|
808
|
+
}
|
|
809
|
+
export interface DeleteInsightsPolicyResult {
|
|
810
|
+
deleteInsightsPolicy: boolean;
|
|
811
|
+
}
|
|
812
|
+
export interface UpsertInsightsLearningPolicyResult {
|
|
813
|
+
upsertInsightsLearningPolicy: InsightsLearningPolicy;
|
|
814
|
+
}
|
|
815
|
+
export interface DeleteInsightsLearningPolicyResult {
|
|
816
|
+
deleteInsightsLearningPolicy: boolean;
|
|
817
|
+
}
|
|
818
|
+
export interface ResolveInsightsAnomalyResult {
|
|
819
|
+
resolveInsightsAnomaly: boolean;
|
|
820
|
+
}
|
|
821
|
+
export interface BulkResolveInsightsAnomaliesResult {
|
|
822
|
+
bulkResolveInsightsAnomalies: InsightsBulkResolveResult;
|
|
823
|
+
}
|
|
824
|
+
export interface UpsertInsightsGuardrailResult {
|
|
825
|
+
upsertInsightsGuardrail: InsightsGuardrail;
|
|
826
|
+
}
|
|
827
|
+
export interface DeleteInsightsGuardrailResult {
|
|
828
|
+
deleteInsightsGuardrail: boolean;
|
|
829
|
+
}
|
|
830
|
+
export interface SeedInsightsGuardrailResult {
|
|
831
|
+
seedInsightsGuardrail: boolean;
|
|
832
|
+
}
|
|
833
|
+
export interface AllowInsightsGuardrailViolationResult {
|
|
834
|
+
allowInsightsGuardrailViolation: boolean;
|
|
835
|
+
}
|
|
836
|
+
export interface DismissInsightsGuardrailViolationResult {
|
|
837
|
+
dismissInsightsGuardrailViolation: boolean;
|
|
838
|
+
}
|
|
839
|
+
export interface ReopenInsightsGuardrailViolationResult {
|
|
840
|
+
reopenInsightsGuardrailViolation: boolean;
|
|
841
|
+
}
|
|
842
|
+
export interface UpdateInsightsSystemSettingsResult {
|
|
843
|
+
updateInsightsSystemSettings: InsightsSystemSettings;
|
|
844
|
+
}
|
|
681
845
|
export interface GetRecommendationsData {
|
|
682
846
|
recommendations?: Recommendation[];
|
|
683
847
|
computePlatform?: {
|
|
@@ -785,6 +949,42 @@ export interface OdigosApiOperations {
|
|
|
785
949
|
APPLY_RECOMMENDATION_REMEDIATION?: Operation<ApplyRecommendationRemediationResult, ApplyRecommendationRemediationVars>;
|
|
786
950
|
GET_ALL_CLUSTER_SNAPSHOTS?: Operation<AllClusterSnapshots, undefined>;
|
|
787
951
|
GET_CLUSTER_SNAPSHOT?: Operation<ClusterSnapshot, GetClusterSnapshotVars>;
|
|
952
|
+
GET_INSIGHTS_SERVICES?: Operation<InsightsServiceStat[], undefined>;
|
|
953
|
+
GET_INSIGHTS_SERVICE_PROFILE?: Operation<InsightsServiceProfile | undefined, GetInsightsServiceProfileVars>;
|
|
954
|
+
GET_INSIGHTS_BLAST_RADIUS?: Operation<InsightsBlastRadiusSubgraph | undefined, GetInsightsBlastRadiusVars>;
|
|
955
|
+
GET_INSIGHTS_TRANSACTIONS?: Operation<InsightsTransactionStat[], GetInsightsTransactionsVars | undefined>;
|
|
956
|
+
GET_INSIGHTS_TRANSACTION?: Operation<InsightsTransaction | undefined, GetInsightsTransactionVars>;
|
|
957
|
+
GET_INSIGHTS_BASELINE?: Operation<InsightsBaselineClass[], GetInsightsBaselineVars>;
|
|
958
|
+
GET_INSIGHTS_OBSERVATIONS?: Operation<InsightsObservationSummary[], GetInsightsObservationsVars>;
|
|
959
|
+
GET_INSIGHTS_OBSERVATION?: Operation<InsightsObservation | undefined, GetInsightsObservationVars>;
|
|
960
|
+
GET_INSIGHTS_FINDINGS?: Operation<InsightsFinding[], GetInsightsFindingsVars | undefined>;
|
|
961
|
+
GET_INSIGHTS_ANOMALIES?: Operation<InsightsAnomalySummary[], GetInsightsAnomaliesVars | undefined>;
|
|
962
|
+
GET_INSIGHTS_ANOMALY?: Operation<InsightsAnomalyIssue | undefined, GetInsightsAnomalyVars>;
|
|
963
|
+
GET_INSIGHTS_POLICIES?: Operation<InsightsPolicy[], undefined>;
|
|
964
|
+
GET_INSIGHTS_LEARNING_POLICIES?: Operation<InsightsLearningPolicy[], undefined>;
|
|
965
|
+
GET_INSIGHTS_GUARDRAILS?: Operation<InsightsGuardrail[], undefined>;
|
|
966
|
+
GET_INSIGHTS_GUARDRAIL_VIOLATIONS?: Operation<InsightsGuardrailViolation[], GetInsightsGuardrailViolationsVars | undefined>;
|
|
967
|
+
GET_INSIGHTS_GUARDRAIL_VIOLATION?: Operation<InsightsGuardrailViolationDetail | undefined, GetInsightsGuardrailViolationVars>;
|
|
968
|
+
GET_INSIGHTS_CATALOG?: Operation<InsightsCatalog, undefined>;
|
|
969
|
+
GET_INSIGHTS_SYSTEM_SETTINGS?: Operation<InsightsSystemSettings, undefined>;
|
|
970
|
+
GET_INSIGHTS_STORAGE_HEALTH?: Operation<InsightsStorageHealth, undefined>;
|
|
971
|
+
PROMOTE_INSIGHTS_BASELINE_CLASS?: Operation<InsightsPromoteResult, PromoteInsightsBaselineClassVars>;
|
|
972
|
+
RESET_INSIGHTS_BASELINE_CLASS?: Operation<boolean, ResetInsightsBaselineClassVars>;
|
|
973
|
+
RESET_INSIGHTS_TRANSACTION_BASELINES?: Operation<boolean, ResetInsightsTransactionBaselinesVars>;
|
|
974
|
+
DELETE_INSIGHTS_TRANSACTION?: Operation<boolean, DeleteInsightsTransactionVars>;
|
|
975
|
+
UPSERT_INSIGHTS_POLICY?: Operation<InsightsPolicy, UpsertInsightsPolicyVars>;
|
|
976
|
+
DELETE_INSIGHTS_POLICY?: Operation<boolean, DeleteInsightsPolicyVars>;
|
|
977
|
+
UPSERT_INSIGHTS_LEARNING_POLICY?: Operation<InsightsLearningPolicy, UpsertInsightsLearningPolicyVars>;
|
|
978
|
+
DELETE_INSIGHTS_LEARNING_POLICY?: Operation<boolean, DeleteInsightsLearningPolicyVars>;
|
|
979
|
+
RESOLVE_INSIGHTS_ANOMALY?: Operation<boolean, ResolveInsightsAnomalyVars>;
|
|
980
|
+
BULK_RESOLVE_INSIGHTS_ANOMALIES?: Operation<InsightsBulkResolveResult, BulkResolveInsightsAnomaliesVars>;
|
|
981
|
+
UPSERT_INSIGHTS_GUARDRAIL?: Operation<InsightsGuardrail, UpsertInsightsGuardrailVars>;
|
|
982
|
+
DELETE_INSIGHTS_GUARDRAIL?: Operation<boolean, DeleteInsightsGuardrailVars>;
|
|
983
|
+
SEED_INSIGHTS_GUARDRAIL?: Operation<boolean, SeedInsightsGuardrailVars>;
|
|
984
|
+
ALLOW_INSIGHTS_GUARDRAIL_VIOLATION?: Operation<boolean, InsightsViolationActionVars>;
|
|
985
|
+
DISMISS_INSIGHTS_GUARDRAIL_VIOLATION?: Operation<boolean, InsightsViolationActionVars>;
|
|
986
|
+
REOPEN_INSIGHTS_GUARDRAIL_VIOLATION?: Operation<boolean, InsightsViolationActionVars>;
|
|
987
|
+
UPDATE_INSIGHTS_SYSTEM_SETTINGS?: Operation<InsightsSystemSettings, UpdateInsightsSystemSettingsVars>;
|
|
788
988
|
}
|
|
789
989
|
/**
|
|
790
990
|
* The host's Apollo configuration. The kit constructs the ApolloClient
|
|
@@ -52,6 +52,7 @@ import { type ActionsApi } from './hooks/use-actions-api';
|
|
|
52
52
|
import { type MetricsApi } from './hooks/use-metrics-api';
|
|
53
53
|
import { type DescribeApi } from './hooks/use-describe-api';
|
|
54
54
|
import { type SamplingApi } from './hooks/use-sampling-api';
|
|
55
|
+
import { type InsightsApi } from './hooks/use-insights-api';
|
|
55
56
|
import { type NamespaceApi } from './hooks/use-namespace-api';
|
|
56
57
|
import { type SnapshotsApi } from './hooks/use-snapshots-api';
|
|
57
58
|
import { type ProfilingApi } from './hooks/use-profiling-api';
|
|
@@ -80,6 +81,7 @@ export interface UseOdigosApiReturn {
|
|
|
80
81
|
samplingApi: SamplingApi;
|
|
81
82
|
recommendationsApi: RecommendationsApi;
|
|
82
83
|
snapshotsApi: SnapshotsApi;
|
|
84
|
+
insightsApi: InsightsApi;
|
|
83
85
|
capabilities: Capabilities;
|
|
84
86
|
/**
|
|
85
87
|
* Wipe Apollo's normalized cache in place. Soft alternative to bumping
|
package/lib/contexts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as a,r as x,a as y}from"./chunks/source-instrument-form-context-
|
|
1
|
+
import{u as a,r as x,a as y}from"./chunks/source-instrument-form-context-BF70uJ_R.js";export{A as ActionFormContextProvider,C as CloudConnectorFormContextProvider,D as DataStreamFormContextProvider,b as DestinationFormContextProvider,O as OdigosApiConnectionsScope,c as OdigosApiProvider,R as RuleFormContextProvider,S as SamplingRuleFormType,d as SamplingRulesFormProvider,e as SourceEditFormContextProvider,f as SourceInstrumentFormContextProvider,p as prepareNamespacePayloads,g as prepareSourcePayloads,h as useActionFormContext,i as useApiLazyQuery,j as useApiMutation,k as useApiQuery,l as useCloudConnectorFormContext,m as useDataStreamFormContext,n as useDestinationFormContext,o as useOdigosApi,q as useRuleFormContext,s as useSamplingRulesFormContext,t as useSourceEditFormContext,v as useSourceInstrumentFormContext}from"./chunks/source-instrument-form-context-BF70uJ_R.js";export{O as OdigosProvider,c as checkVersionSupport,r as resolveMinSupportedVersion,u as useOdigos}from"./chunks/helpers-B0SJ6hqm.js";import{jsx as F}from"react/jsx-runtime";import{useMemo as P,useContext as E,createContext as T}from"react";import{P as I,t as _}from"./chunks/ui-components-DqG0z5U0.js";import{useApolloClient as w}from"@apollo/client/react";import"@apollo/client/link/error";import"@apollo/client/link/context";import"@apollo/client/utilities";import"@apollo/client/errors";import"@apollo/client";import"styled-components";import"./icons.js";import"zustand";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";const M=()=>{const o=w(),{operations:r,context:e}=a();return{multiFetch:async(t,s,n)=>{const i=r[t];return i?y(o,i,s,n,e):{results:[],allSucceeded:!1,anySucceeded:!1,successCount:0,failureCount:s.length,error:`Operation ${String(t)} not configured`}},bulkPersistSources:async(t,s)=>{const n=[];for(const i of t){const t={...e,proxyID:i},{error:a}=await x(o,r.PERSIST_SOURCES,s,t);a&&n.push(`${i}: ${a}`)}return n.length?{error:n.join(", ")}:void 0},applyConfigurations:async(t,s)=>{if(!r.UPDATE_REMOTE_CONFIG)return{error:"UPDATE_REMOTE_CONFIG not configured"};if(!t.length)return{error:"No connections selected"};const n={formData:s,connectionIds:t},i=r.UPDATE_REMOTE_CONFIG;let a;return 1===t.length?({error:a}=await x(o,i,n,e)):({error:a}=await y(o,i,t,n,e)),a?{error:a}:void 0}}},N=(o,r)=>o.platformType===I.K8s?r.K8s:[I.Vm,I.Connector,I.AwsEcs].includes(o.platformType)?r.Vm:void 0,V=o=>r=>{const e=o[r.platformType];if(!e)return;const t=Object.keys(e);if(0===t.length)return;const s=_(r.schemaVersion??r.version),n=[...t].sort((o,r)=>_(r)-_(o)).find(o=>s>=_(o));return n?e[n]:void 0},U=(o,r)=>{const e={};for(const t of Object.keys(o))e[t]=r(o[t]);return e},z=T({formType:void 0}),G=({children:o,formType:r})=>{const e=P(()=>({formType:r}),[r]);return F(z.Provider,{value:e,children:o})},$=()=>E(z);export{G as StorybookProvider,N as pickByPlatform,M as useApiForConnections,$ as useStorybook,V as versionedDocument,U as vmDialectMap};
|
package/lib/functions/index.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export * from './decimals-only';
|
|
|
61
61
|
export * from './numbers-only';
|
|
62
62
|
export * from './parse-boolean-from-string';
|
|
63
63
|
export * from './parse-json-string-to-pretty-string';
|
|
64
|
+
export * from './parse-raw-otlp';
|
|
64
65
|
export * from './prepare-destination-form-data';
|
|
65
66
|
export * from './remove-empty-values-from-object';
|
|
66
67
|
export * from './safe-json-parse';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse Insights `rawOtlp` (base64 OTLP TracesData protobuf) into UI-ready span views.
|
|
3
|
+
* All fields are optional / nullable so callers can render without crashing on bad payloads.
|
|
4
|
+
*/
|
|
5
|
+
export interface InsightsOtlpKv {
|
|
6
|
+
key?: string | null;
|
|
7
|
+
value?: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface InsightsOtlpSpanEvent {
|
|
10
|
+
name?: string | null;
|
|
11
|
+
offsetMs?: number | null;
|
|
12
|
+
attrs?: InsightsOtlpKv[] | null;
|
|
13
|
+
}
|
|
14
|
+
/** Flat, waterfall-ready span — mirrors Insights `engine.SpanView`. */
|
|
15
|
+
export interface InsightsOtlpSpan {
|
|
16
|
+
spanId?: string | null;
|
|
17
|
+
parentSpanId?: string | null;
|
|
18
|
+
name?: string | null;
|
|
19
|
+
service?: string | null;
|
|
20
|
+
kind?: string | null;
|
|
21
|
+
depth?: number | null;
|
|
22
|
+
/** Absolute start time as a decimal string (uint64 nanos; unsafe as JS number). */
|
|
23
|
+
startUnixNano?: string | null;
|
|
24
|
+
/** Absolute end time as a decimal string (uint64 nanos; unsafe as JS number). */
|
|
25
|
+
endUnixNano?: string | null;
|
|
26
|
+
offsetMs?: number | null;
|
|
27
|
+
durationMs?: number | null;
|
|
28
|
+
scope?: string | null;
|
|
29
|
+
statusCode?: string | null;
|
|
30
|
+
statusMsg?: string | null;
|
|
31
|
+
attrs?: InsightsOtlpKv[] | null;
|
|
32
|
+
events?: InsightsOtlpSpanEvent[] | null;
|
|
33
|
+
}
|
|
34
|
+
export interface InsightsParsedOtlpTrace {
|
|
35
|
+
spans?: InsightsOtlpSpan[] | null;
|
|
36
|
+
/** Present when decode fails; `spans` is then null/empty. */
|
|
37
|
+
error?: string | null;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Decode a base64 OTLP `TracesData` protobuf into optional/nullable span views.
|
|
41
|
+
* Never throws — returns `{ spans: null, error }` on failure.
|
|
42
|
+
*/
|
|
43
|
+
export declare const parseRawOtlp: (rawOtlp?: string | null) => InsightsParsedOtlpTrace;
|
package/lib/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{bt as adaptInstrumentationRuleFromWire,br as adaptInstrumentationRuleInputForWire,cq as buildBadgeForDesiredStatus,gm as buildCatalogFieldsDataCard,cg as buildCatalogFieldsSegments,gn as capitalizeFirstLetter,go as cleanObjectEmptyStringsValues,a9 as compareCondition,gp as decimalsOnly,b3 as deepClone,fs as entityIdKey,fx as filterActions,fw as filterDestinations,ck as filterDestinationsByStream,fv as filterSources,fi as filterSourcesByStream,gq as flattenObjectKeys,cF as formatBytes,f1 as formatDuration,b9 as generateId,fp as getActionConditions,ci as getActionIcon,fq as getConditionsBooleans,cY as getContainersIcons,gr as getContainersInstrumentedCount,gs as getDeepValue,c8 as getDestinationIcon,gt as getDetectedLanguageIcons,cv as getEffectiveLanguage,cN as getEffectiveRuntimeVersion,ft as getEntityIcon,bm as getEntityId,fo as getEntityIdKey,fr as getEntityLabel,gu as getHealthBadgeLabel,bj as getIdFromSseTarget,cm as getInstrumentationRuleIcon,gv as getMainContainerLanguage,gw as getMetricForEntity,gx as getMonitorIcon,gy as getNearestTypographySize,cX as getPlatformIcon,eW as getPlatformLabel,$ as getProgrammingLanguageIcon,gz as getRecursiveValues,cE as getSourceKindLabel,cB as getSourceLanguageIcons,bc as getSseTargetFromId,cL as getStatusColor,fz as getStatusFromPodStatus,cM as getStatusIcon,cG as getStatusTypeFromOdigosHealth,gA as getValueForRange,cA as getVirtualServiceIcon,cz as getWorkloadId,cl as getYamlFieldsForDestination,gB as hasUnhealthyInstances,gC as instrumentationRuleSourceScopesFromWire,gD as instrumentationRuleSourceScopesToWire,by as isEmpty,bz as isLegalK8sLabel,dH as isOverTime,gE as isStringABoolean,gF as isTimeElapsed,cK as isValidVersion,gG as mapConditions,cs as mapDesiredStatusToConditionStatus,ce as mapDesiredStatusesToConditions,cj as mapDestinationFieldsForDisplay,bD as mapExportedSignals,bB as mapSupportedSignals,gH as numbersOnly,gI as parseBooleanFromString,gJ as parseJsonStringToPrettyString,f3 as parseRawOtlp,bS as prepareDestinationFormData,gK as removeEmptyValuesFromObject,E as safeJsonParse,gL as safeJsonStringify,gM as setDeepValue,gN as sleep,an as splitCamelString,gO as stringifyNonStringValues,t as trimVersion}from"./chunks/ui-components-DqG0z5U0.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/hooks/useCopy.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonProps } from '../components/button';
|
|
3
3
|
interface UseCopyProps {
|
|
4
4
|
onDone?: () => void;
|
|
5
5
|
}
|
|
6
6
|
declare const useCopy: ({ onDone }?: UseCopyProps) => {
|
|
7
7
|
CopyButton: React.FC<{
|
|
8
8
|
value: string;
|
|
9
|
-
|
|
10
|
-
}>;
|
|
9
|
+
} & Omit<ButtonProps, "onClick" | "leftIcon" | "rightIcon">>;
|
|
11
10
|
isCopied: boolean;
|
|
12
11
|
copiedIndex: number;
|
|
13
12
|
clickCopy: (str: string, idx?: number) => Promise<void>;
|
|
@@ -9,6 +9,10 @@ export interface FormatDurationAgoOptions {
|
|
|
9
9
|
suffix?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export type FormatDurationAgo = (wen: Date | number | string, opts?: FormatDurationAgoOptions) => string;
|
|
12
|
+
/** Format an elapsed duration in milliseconds into a human age string. */
|
|
13
|
+
export declare const formatDurationMs: (durationMs: number, { units, style, suffix }?: FormatDurationAgoOptions) => string;
|
|
14
|
+
/** Format a whole-minute age (e.g. baseline `quiet_minutes`) into a human age string. */
|
|
15
|
+
export declare const formatDurationMinutes: (minutes: number, opts?: FormatDurationAgoOptions) => string;
|
|
12
16
|
export declare const useTimeAgo: () => {
|
|
13
17
|
formatTimeAgo: FormatTimeAgo;
|
|
14
18
|
formatDurationAgo: FormatDurationAgo;
|
package/lib/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{h7 as IGNORE_OUTSIDE_CLICK_ATTR,f5 as formatDurationMinutes,h8 as formatDurationMs,h9 as useActionFormData,ha as useBodyScroll,fu as useContainerSize,u as useCopy,hb as useDataStreamFormData,hc as useDestinationFormData,bu as useGenericForm,hd as useInstrumentationRuleFormData,dG as useKeyDown,cH as useOnClickOutside,he as useOverflow,hf as usePopup,cp as useScrollIntoViewWhen,fR as useScrollTo,fl as useSessionStorage,hg as useSourceFormData,cn as useTimeAgo}from"./chunks/ui-components-DqG0z5U0.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";
|
|
@@ -25,6 +25,8 @@ export * from './home-icon';
|
|
|
25
25
|
export * from './i-square-icon';
|
|
26
26
|
export * from './image-error-icon';
|
|
27
27
|
export * from './inbound-icon';
|
|
28
|
+
export * from './insights-findings-icon';
|
|
29
|
+
export * from './insights-transactions-icon';
|
|
28
30
|
export * from './key-icon';
|
|
29
31
|
export * from './list-icon';
|
|
30
32
|
export * from './lock-icon';
|
|
@@ -49,6 +51,7 @@ export * from './settings-icon';
|
|
|
49
51
|
export * from './sort-arrows-icon';
|
|
50
52
|
export * from './star-icon';
|
|
51
53
|
export * from './terminal-icon';
|
|
54
|
+
export * from './threat-detection-icon';
|
|
52
55
|
export * from './trash-icon';
|
|
53
56
|
export * from './user-circle-icon';
|
|
54
57
|
export * from './user-group-icon';
|