@odigos/ui-kit 0.0.286 → 0.0.288
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/.cursor/rules/frontend-workflow.mdc +27 -0
- package/.cursor/rules/ui-feedback-tables-forms.mdc +40 -0
- package/.cursor/rules/ui-implementation.mdc +21 -0
- package/.cursor/rules/ui-pages-and-drawers.mdc +34 -0
- package/.cursor/rules/ui-visual-language.mdc +27 -0
- package/CHANGELOG.md +22 -0
- package/docs/api-context.md +1 -1
- package/lib/chunks/helpers-BCSEuuKh.js +9 -0
- package/lib/chunks/index-Cy84opXf.js +351 -0
- package/lib/chunks/source-instrument-form-context-D6pVu22G.js +5 -0
- package/lib/chunks/ui-components-D8rTJS7r.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 +20 -0
- package/lib/constants/url-templatization/index.d.ts +90 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_drawers/edit-source-drawer/overview/instructions-card.d.ts +21 -0
- 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-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 +40 -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 +15 -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 +25 -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 +33 -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/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 +1909 -286
- package/lib/contexts/odigos-api/capabilities.d.ts +4 -0
- package/lib/contexts/odigos-api/hooks/use-insights-api.d.ts +162 -0
- package/lib/contexts/odigos-api/hooks/use-sources-api.d.ts +10 -1
- 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 +229 -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/blast-radius/animated-edge.d.ts +10 -0
- package/lib/snippets/blast-radius/blast-radius-node.d.ts +6 -0
- package/lib/snippets/blast-radius/helpers.d.ts +29 -0
- package/lib/snippets/blast-radius/index.d.ts +7 -0
- package/lib/snippets/blast-radius/types.d.ts +19 -0
- package/lib/snippets/code-modal/index.d.ts +9 -0
- package/lib/snippets/index.d.ts +2 -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/workload/index.d.ts +61 -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
|
@@ -23,6 +23,8 @@ export interface Capabilities {
|
|
|
23
23
|
canRestartWorkloads: boolean;
|
|
24
24
|
canFetchPeerSources: boolean;
|
|
25
25
|
canFetchSourceLibraries: boolean;
|
|
26
|
+
/** The host can tell a customer how to instrument a workload themselves (cloud connectors). */
|
|
27
|
+
canFetchInstrumentationInstructions: boolean;
|
|
26
28
|
canFetchK8sManifest: boolean;
|
|
27
29
|
canCreateDestination: boolean;
|
|
28
30
|
canTestConnection: boolean;
|
|
@@ -40,6 +42,8 @@ export interface Capabilities {
|
|
|
40
42
|
canFetchProfiling: boolean;
|
|
41
43
|
canFetchCollectorInfo: boolean;
|
|
42
44
|
canManageSamplingRules: boolean;
|
|
45
|
+
canManageInsightsPolicies: boolean;
|
|
46
|
+
canFetchInsights: boolean;
|
|
43
47
|
canManageRecommendations: boolean;
|
|
44
48
|
}
|
|
45
49
|
export declare const deriveCapabilities: (operations: OdigosApiOperations, ctx: OperationContext) => Capabilities;
|
|
@@ -0,0 +1,162 @@
|
|
|
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, ForcePromoteInsightsServiceVars, EnableInsightsTransactionGuardrailVars, DisableInsightsTransactionGuardrailVars, 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
|
+
forcePromoteService?: (vars: ForcePromoteInsightsServiceVars) => Promise<{
|
|
106
|
+
error?: string;
|
|
107
|
+
} | undefined>;
|
|
108
|
+
enableTransactionGuardrail?: (vars: EnableInsightsTransactionGuardrailVars) => Promise<{
|
|
109
|
+
error?: string;
|
|
110
|
+
} | undefined>;
|
|
111
|
+
disableTransactionGuardrail?: (vars: DisableInsightsTransactionGuardrailVars) => Promise<{
|
|
112
|
+
error?: string;
|
|
113
|
+
} | undefined>;
|
|
114
|
+
deleteTransaction?: (transactionId: string) => Promise<{
|
|
115
|
+
error?: string;
|
|
116
|
+
} | undefined>;
|
|
117
|
+
upsertPolicy?: (policy: InsightsPolicyInput) => Promise<{
|
|
118
|
+
data?: InsightsPolicy;
|
|
119
|
+
error?: string;
|
|
120
|
+
} | undefined>;
|
|
121
|
+
deletePolicy?: (scope: InsightsPolicyScope, scopeKey: string) => Promise<{
|
|
122
|
+
error?: string;
|
|
123
|
+
} | undefined>;
|
|
124
|
+
upsertLearningPolicy?: (policy: InsightsLearningPolicyInput) => Promise<{
|
|
125
|
+
data?: InsightsLearningPolicy;
|
|
126
|
+
error?: string;
|
|
127
|
+
} | undefined>;
|
|
128
|
+
deleteLearningPolicy?: (deviationClass: InsightsDeviationClass, scope: InsightsPolicyScope, scopeKey: string) => Promise<{
|
|
129
|
+
error?: string;
|
|
130
|
+
} | undefined>;
|
|
131
|
+
resolveAnomaly?: (vars: ResolveInsightsAnomalyVars) => Promise<{
|
|
132
|
+
error?: string;
|
|
133
|
+
} | undefined>;
|
|
134
|
+
bulkResolveAnomalies?: (resolution: InsightsBulkResolution, items: InsightsAnomalyRefInput[]) => Promise<{
|
|
135
|
+
data?: InsightsBulkResolveResult;
|
|
136
|
+
error?: string;
|
|
137
|
+
} | undefined>;
|
|
138
|
+
upsertGuardrail?: (guardrail: InsightsGuardrailInput) => Promise<{
|
|
139
|
+
data?: InsightsGuardrail;
|
|
140
|
+
error?: string;
|
|
141
|
+
} | undefined>;
|
|
142
|
+
deleteGuardrail?: (scopeKey: string) => Promise<{
|
|
143
|
+
error?: string;
|
|
144
|
+
} | undefined>;
|
|
145
|
+
seedGuardrail?: (seed: InsightsGuardrailSeedInput) => Promise<{
|
|
146
|
+
error?: string;
|
|
147
|
+
} | undefined>;
|
|
148
|
+
allowViolation?: (action: InsightsViolationActionInput) => Promise<{
|
|
149
|
+
error?: string;
|
|
150
|
+
} | undefined>;
|
|
151
|
+
dismissViolation?: (action: InsightsViolationActionInput) => Promise<{
|
|
152
|
+
error?: string;
|
|
153
|
+
} | undefined>;
|
|
154
|
+
reopenViolation?: (action: InsightsViolationActionInput) => Promise<{
|
|
155
|
+
error?: string;
|
|
156
|
+
} | undefined>;
|
|
157
|
+
updateSystemSettings?: (settings: InsightsSystemSettingsInput) => Promise<{
|
|
158
|
+
data?: InsightsSystemSettings;
|
|
159
|
+
error?: string;
|
|
160
|
+
} | undefined>;
|
|
161
|
+
}
|
|
162
|
+
export declare const useInsightsApi: (operations: OdigosApiOperations, ctx: OperationContext) => InsightsApi;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* `useApiQuery('GET_WORKLOADS')` subscriber.
|
|
26
26
|
*/
|
|
27
27
|
import { type UseApiQueryOptions, type UseApiQueryResult } from '../use-api-query';
|
|
28
|
-
import type { GetSourceLibrariesData, GetPeerSourcesVars, OperationContext, OdigosApiOperations } from '../types';
|
|
28
|
+
import type { GetInstrumentationInstructionsData, GetInstrumentationInstructionsVars, GetSourceLibrariesData, GetPeerSourcesVars, OperationContext, OdigosApiOperations } from '../types';
|
|
29
29
|
import { type PeerSources, type SourceFormData, type Workload, type WorkloadId } from '../../../types';
|
|
30
30
|
import { type NamespaceSelectionFormData, type SourceSelectionFormData } from '../../../store';
|
|
31
31
|
export interface PersistSourceInput {
|
|
@@ -83,6 +83,15 @@ export interface SourcesApi {
|
|
|
83
83
|
}>) => UseApiQueryResult<{
|
|
84
84
|
peerSources?: PeerSources;
|
|
85
85
|
}>;
|
|
86
|
+
/**
|
|
87
|
+
* Subscribe to how one workload should be instrumented — the connector-rendered documents a
|
|
88
|
+
* customer applies in manual mode. Owns a `useApiQuery('GET_INSTRUMENTATION_INSTRUCTIONS')`;
|
|
89
|
+
* call at the top level of a container.
|
|
90
|
+
*
|
|
91
|
+
* The slot is optional, so on a host that does not serve it (k8s, which instruments workloads
|
|
92
|
+
* itself) this reports `unsupported` and never fires a request.
|
|
93
|
+
*/
|
|
94
|
+
useInstrumentationInstructions: (vars?: GetInstrumentationInstructionsVars, options?: UseApiQueryOptions<GetInstrumentationInstructionsData>) => UseApiQueryResult<GetInstrumentationInstructionsData>;
|
|
86
95
|
/** Persist the legacy form-shape payload (used by `AddSourceDrawer` / `Onboarding`). */
|
|
87
96
|
persist: (selectAppsList: SourceSelectionFormData, futureSelectAppsList: NamespaceSelectionFormData) => Promise<void>;
|
|
88
97
|
/** Persist the V2 multi-cluster payload shape (used by `CentralConnections` / standalone overview's bulk persist). */
|
|
@@ -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, GetInstrumentationInstructionsData, GetInstrumentationInstructionsVars, 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, ForcePromoteInsightsServiceVars, EnableInsightsTransactionGuardrailVars, DisableInsightsTransactionGuardrailVars, 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, InstrumentationInstructions, 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)` /
|
|
@@ -257,6 +257,19 @@ export interface GetSourceLibrariesData {
|
|
|
257
257
|
}[];
|
|
258
258
|
}[];
|
|
259
259
|
}
|
|
260
|
+
/** Variables for `GET_INSTRUMENTATION_INSTRUCTIONS` — the same composite id the workload is keyed by. */
|
|
261
|
+
export type GetInstrumentationInstructionsVars = WorkloadId;
|
|
262
|
+
/**
|
|
263
|
+
* Result envelope for `GET_INSTRUMENTATION_INSTRUCTIONS`.
|
|
264
|
+
*
|
|
265
|
+
* Null is a normal answer, not an error: the workload's type may have no instrumentation defined on
|
|
266
|
+
* this connector at all. The drawer renders nothing in that case — the report already explains why
|
|
267
|
+
* the workload is not instrumented, and an empty "how to instrument it" panel would compete with
|
|
268
|
+
* that explanation.
|
|
269
|
+
*/
|
|
270
|
+
export interface GetInstrumentationInstructionsData {
|
|
271
|
+
instrumentationInstructions?: InstrumentationInstructions | null;
|
|
272
|
+
}
|
|
260
273
|
/** Variables for the peer-sources query (used by service map). */
|
|
261
274
|
export interface GetPeerSourcesVars {
|
|
262
275
|
serviceName: string;
|
|
@@ -537,6 +550,13 @@ export interface GetSamplingRulesData {
|
|
|
537
550
|
k8sHealthProbesConfig?: SamplingRulesK8sHealthConfig;
|
|
538
551
|
};
|
|
539
552
|
}
|
|
553
|
+
export interface UpsertInsightsPolicyVars {
|
|
554
|
+
policy: InsightsPolicyInput;
|
|
555
|
+
}
|
|
556
|
+
export interface DeleteInsightsPolicyVars {
|
|
557
|
+
scope: InsightsPolicyScope;
|
|
558
|
+
scopeKey: string;
|
|
559
|
+
}
|
|
540
560
|
export interface SamplingRuleCreateVars<TInput> {
|
|
541
561
|
samplingId: string;
|
|
542
562
|
rule: TInput;
|
|
@@ -597,6 +617,121 @@ export interface GetAllClusterSnapshotsData {
|
|
|
597
617
|
export interface GetClusterSnapshotData {
|
|
598
618
|
clusterSnapshot?: ClusterSnapshot;
|
|
599
619
|
}
|
|
620
|
+
export interface GetInsightsTransactionsVars {
|
|
621
|
+
namespace?: string | null;
|
|
622
|
+
service?: string | null;
|
|
623
|
+
kind?: InsightsTransactionKind | null;
|
|
624
|
+
}
|
|
625
|
+
export interface GetInsightsTransactionVars {
|
|
626
|
+
id: string;
|
|
627
|
+
}
|
|
628
|
+
export interface GetInsightsBaselineVars {
|
|
629
|
+
transactionId: string;
|
|
630
|
+
}
|
|
631
|
+
export interface GetInsightsObservationsVars {
|
|
632
|
+
transactionId: string;
|
|
633
|
+
sampleReason?: InsightsSampleReason | null;
|
|
634
|
+
}
|
|
635
|
+
export interface GetInsightsObservationVars {
|
|
636
|
+
transactionId: string;
|
|
637
|
+
traceId: string;
|
|
638
|
+
}
|
|
639
|
+
export interface GetInsightsFindingsVars {
|
|
640
|
+
windowHours?: number | null;
|
|
641
|
+
service?: string | null;
|
|
642
|
+
namespace?: string | null;
|
|
643
|
+
status?: string | null;
|
|
644
|
+
kind?: InsightsFindingKind | null;
|
|
645
|
+
}
|
|
646
|
+
export interface GetInsightsAnomaliesVars {
|
|
647
|
+
windowHours?: number | null;
|
|
648
|
+
service?: string | null;
|
|
649
|
+
namespace?: string | null;
|
|
650
|
+
status?: string | null;
|
|
651
|
+
}
|
|
652
|
+
export interface GetInsightsAnomalyVars {
|
|
653
|
+
transactionId: string;
|
|
654
|
+
signature: string;
|
|
655
|
+
}
|
|
656
|
+
export interface GetInsightsGuardrailViolationsVars {
|
|
657
|
+
windowHours?: number | null;
|
|
658
|
+
service?: string | null;
|
|
659
|
+
namespace?: string | null;
|
|
660
|
+
status?: string | null;
|
|
661
|
+
}
|
|
662
|
+
export interface GetInsightsGuardrailViolationVars {
|
|
663
|
+
scopeKey: string;
|
|
664
|
+
ruleKey: string;
|
|
665
|
+
offending: string;
|
|
666
|
+
}
|
|
667
|
+
export interface GetInsightsServiceProfileVars {
|
|
668
|
+
namespace?: string | null;
|
|
669
|
+
service: string;
|
|
670
|
+
}
|
|
671
|
+
export interface GetInsightsBlastRadiusVars {
|
|
672
|
+
namespace?: string | null;
|
|
673
|
+
service: string;
|
|
674
|
+
depth?: number | null;
|
|
675
|
+
}
|
|
676
|
+
export interface PromoteInsightsBaselineClassVars {
|
|
677
|
+
transactionId: string;
|
|
678
|
+
class: InsightsDeviationClass;
|
|
679
|
+
}
|
|
680
|
+
export interface ResetInsightsBaselineClassVars {
|
|
681
|
+
transactionId: string;
|
|
682
|
+
class: InsightsDeviationClass;
|
|
683
|
+
}
|
|
684
|
+
export interface ResetInsightsTransactionBaselinesVars {
|
|
685
|
+
transactionId: string;
|
|
686
|
+
}
|
|
687
|
+
export interface ForcePromoteInsightsServiceVars {
|
|
688
|
+
namespace: string;
|
|
689
|
+
service: string;
|
|
690
|
+
}
|
|
691
|
+
export type EnableInsightsTransactionGuardrailVars = ForcePromoteInsightsServiceVars;
|
|
692
|
+
export type DisableInsightsTransactionGuardrailVars = ForcePromoteInsightsServiceVars;
|
|
693
|
+
export interface DeleteInsightsTransactionVars {
|
|
694
|
+
transactionId: string;
|
|
695
|
+
}
|
|
696
|
+
export interface UpsertInsightsPolicyVars {
|
|
697
|
+
policy: InsightsPolicyInput;
|
|
698
|
+
}
|
|
699
|
+
export interface DeleteInsightsPolicyVars {
|
|
700
|
+
scope: InsightsPolicyScope;
|
|
701
|
+
scopeKey: string;
|
|
702
|
+
}
|
|
703
|
+
export interface UpsertInsightsLearningPolicyVars {
|
|
704
|
+
policy: InsightsLearningPolicyInput;
|
|
705
|
+
}
|
|
706
|
+
export interface DeleteInsightsLearningPolicyVars {
|
|
707
|
+
class: InsightsDeviationClass;
|
|
708
|
+
scope: InsightsPolicyScope;
|
|
709
|
+
scopeKey: string;
|
|
710
|
+
}
|
|
711
|
+
export interface ResolveInsightsAnomalyVars {
|
|
712
|
+
transactionId: string;
|
|
713
|
+
signature: string;
|
|
714
|
+
resolution: InsightsAnomalyResolution;
|
|
715
|
+
}
|
|
716
|
+
export interface BulkResolveInsightsAnomaliesVars {
|
|
717
|
+
resolution: InsightsBulkResolution;
|
|
718
|
+
items: InsightsAnomalyRefInput[];
|
|
719
|
+
}
|
|
720
|
+
export interface UpsertInsightsGuardrailVars {
|
|
721
|
+
guardrail: InsightsGuardrailInput;
|
|
722
|
+
}
|
|
723
|
+
export interface DeleteInsightsGuardrailVars {
|
|
724
|
+
scopeKey: string;
|
|
725
|
+
}
|
|
726
|
+
export interface SeedInsightsGuardrailVars {
|
|
727
|
+
seed: InsightsGuardrailSeedInput;
|
|
728
|
+
}
|
|
729
|
+
export interface InsightsViolationActionVars {
|
|
730
|
+
action: InsightsViolationActionInput;
|
|
731
|
+
}
|
|
732
|
+
export interface UpdateInsightsSystemSettingsVars {
|
|
733
|
+
settings: InsightsSystemSettingsInput;
|
|
734
|
+
}
|
|
600
735
|
export interface PersistSourcesResult {
|
|
601
736
|
persistK8sSources: boolean;
|
|
602
737
|
}
|
|
@@ -678,6 +813,54 @@ export interface DeleteCostReductionRuleResult {
|
|
|
678
813
|
export interface UpdateLocalUiSamplingConfigResult {
|
|
679
814
|
updateLocalUiSamplingConfig: boolean;
|
|
680
815
|
}
|
|
816
|
+
export interface PromoteInsightsBaselineClassResult {
|
|
817
|
+
promoteInsightsBaselineClass: InsightsPromoteResult;
|
|
818
|
+
}
|
|
819
|
+
export interface ResetInsightsBaselineClassResult {
|
|
820
|
+
resetInsightsBaselineClass: boolean;
|
|
821
|
+
}
|
|
822
|
+
export interface ResetInsightsTransactionBaselinesResult {
|
|
823
|
+
resetInsightsTransactionBaselines: boolean;
|
|
824
|
+
}
|
|
825
|
+
export interface UpsertInsightsPolicyResult {
|
|
826
|
+
upsertInsightsPolicy: InsightsPolicy;
|
|
827
|
+
}
|
|
828
|
+
export interface DeleteInsightsPolicyResult {
|
|
829
|
+
deleteInsightsPolicy: boolean;
|
|
830
|
+
}
|
|
831
|
+
export interface UpsertInsightsLearningPolicyResult {
|
|
832
|
+
upsertInsightsLearningPolicy: InsightsLearningPolicy;
|
|
833
|
+
}
|
|
834
|
+
export interface DeleteInsightsLearningPolicyResult {
|
|
835
|
+
deleteInsightsLearningPolicy: boolean;
|
|
836
|
+
}
|
|
837
|
+
export interface ResolveInsightsAnomalyResult {
|
|
838
|
+
resolveInsightsAnomaly: boolean;
|
|
839
|
+
}
|
|
840
|
+
export interface BulkResolveInsightsAnomaliesResult {
|
|
841
|
+
bulkResolveInsightsAnomalies: InsightsBulkResolveResult;
|
|
842
|
+
}
|
|
843
|
+
export interface UpsertInsightsGuardrailResult {
|
|
844
|
+
upsertInsightsGuardrail: InsightsGuardrail;
|
|
845
|
+
}
|
|
846
|
+
export interface DeleteInsightsGuardrailResult {
|
|
847
|
+
deleteInsightsGuardrail: boolean;
|
|
848
|
+
}
|
|
849
|
+
export interface SeedInsightsGuardrailResult {
|
|
850
|
+
seedInsightsGuardrail: boolean;
|
|
851
|
+
}
|
|
852
|
+
export interface AllowInsightsGuardrailViolationResult {
|
|
853
|
+
allowInsightsGuardrailViolation: boolean;
|
|
854
|
+
}
|
|
855
|
+
export interface DismissInsightsGuardrailViolationResult {
|
|
856
|
+
dismissInsightsGuardrailViolation: boolean;
|
|
857
|
+
}
|
|
858
|
+
export interface ReopenInsightsGuardrailViolationResult {
|
|
859
|
+
reopenInsightsGuardrailViolation: boolean;
|
|
860
|
+
}
|
|
861
|
+
export interface UpdateInsightsSystemSettingsResult {
|
|
862
|
+
updateInsightsSystemSettings: InsightsSystemSettings;
|
|
863
|
+
}
|
|
681
864
|
export interface GetRecommendationsData {
|
|
682
865
|
recommendations?: Recommendation[];
|
|
683
866
|
computePlatform?: {
|
|
@@ -702,6 +885,12 @@ export interface OdigosApiOperations {
|
|
|
702
885
|
source?: Workload;
|
|
703
886
|
}, WorkloadId>;
|
|
704
887
|
GET_SOURCE_LIBRARIES: Operation<GetSourceLibrariesData, GetSourceLibrariesVars>;
|
|
888
|
+
/**
|
|
889
|
+
* Optional: only cloud-connector hosts serve it. K8s instruments workloads itself and has
|
|
890
|
+
* nothing to instruct a customer to do, so the slot is absent there and the drawer section
|
|
891
|
+
* simply does not render (`useApiQuery` reports `unsupported` and never fires).
|
|
892
|
+
*/
|
|
893
|
+
GET_INSTRUMENTATION_INSTRUCTIONS?: Operation<GetInstrumentationInstructionsData, GetInstrumentationInstructionsVars>;
|
|
705
894
|
GET_PEER_SOURCES: Operation<{
|
|
706
895
|
peerSources?: PeerSources;
|
|
707
896
|
}, GetPeerSourcesVars>;
|
|
@@ -785,6 +974,45 @@ export interface OdigosApiOperations {
|
|
|
785
974
|
APPLY_RECOMMENDATION_REMEDIATION?: Operation<ApplyRecommendationRemediationResult, ApplyRecommendationRemediationVars>;
|
|
786
975
|
GET_ALL_CLUSTER_SNAPSHOTS?: Operation<AllClusterSnapshots, undefined>;
|
|
787
976
|
GET_CLUSTER_SNAPSHOT?: Operation<ClusterSnapshot, GetClusterSnapshotVars>;
|
|
977
|
+
GET_INSIGHTS_SERVICES?: Operation<InsightsServiceStat[], undefined>;
|
|
978
|
+
GET_INSIGHTS_SERVICE_PROFILE?: Operation<InsightsServiceProfile | undefined, GetInsightsServiceProfileVars>;
|
|
979
|
+
GET_INSIGHTS_BLAST_RADIUS?: Operation<InsightsBlastRadiusSubgraph | undefined, GetInsightsBlastRadiusVars>;
|
|
980
|
+
GET_INSIGHTS_TRANSACTIONS?: Operation<InsightsTransactionStat[], GetInsightsTransactionsVars | undefined>;
|
|
981
|
+
GET_INSIGHTS_TRANSACTION?: Operation<InsightsTransaction | undefined, GetInsightsTransactionVars>;
|
|
982
|
+
GET_INSIGHTS_BASELINE?: Operation<InsightsBaselineClass[], GetInsightsBaselineVars>;
|
|
983
|
+
GET_INSIGHTS_OBSERVATIONS?: Operation<InsightsObservationSummary[], GetInsightsObservationsVars>;
|
|
984
|
+
GET_INSIGHTS_OBSERVATION?: Operation<InsightsObservation | undefined, GetInsightsObservationVars>;
|
|
985
|
+
GET_INSIGHTS_FINDINGS?: Operation<InsightsFinding[], GetInsightsFindingsVars | undefined>;
|
|
986
|
+
GET_INSIGHTS_ANOMALIES?: Operation<InsightsAnomalySummary[], GetInsightsAnomaliesVars | undefined>;
|
|
987
|
+
GET_INSIGHTS_ANOMALY?: Operation<InsightsAnomalyIssue | undefined, GetInsightsAnomalyVars>;
|
|
988
|
+
GET_INSIGHTS_POLICIES?: Operation<InsightsPolicy[], undefined>;
|
|
989
|
+
GET_INSIGHTS_LEARNING_POLICIES?: Operation<InsightsLearningPolicy[], undefined>;
|
|
990
|
+
GET_INSIGHTS_GUARDRAILS?: Operation<InsightsGuardrail[], undefined>;
|
|
991
|
+
GET_INSIGHTS_GUARDRAIL_VIOLATIONS?: Operation<InsightsGuardrailViolation[], GetInsightsGuardrailViolationsVars | undefined>;
|
|
992
|
+
GET_INSIGHTS_GUARDRAIL_VIOLATION?: Operation<InsightsGuardrailViolationDetail | undefined, GetInsightsGuardrailViolationVars>;
|
|
993
|
+
GET_INSIGHTS_CATALOG?: Operation<InsightsCatalog, undefined>;
|
|
994
|
+
GET_INSIGHTS_SYSTEM_SETTINGS?: Operation<InsightsSystemSettings, undefined>;
|
|
995
|
+
GET_INSIGHTS_STORAGE_HEALTH?: Operation<InsightsStorageHealth, undefined>;
|
|
996
|
+
PROMOTE_INSIGHTS_BASELINE_CLASS?: Operation<InsightsPromoteResult, PromoteInsightsBaselineClassVars>;
|
|
997
|
+
RESET_INSIGHTS_BASELINE_CLASS?: Operation<boolean, ResetInsightsBaselineClassVars>;
|
|
998
|
+
RESET_INSIGHTS_TRANSACTION_BASELINES?: Operation<boolean, ResetInsightsTransactionBaselinesVars>;
|
|
999
|
+
FORCE_PROMOTE_INSIGHTS_SERVICE?: Operation<boolean, ForcePromoteInsightsServiceVars>;
|
|
1000
|
+
ENABLE_INSIGHTS_TRANSACTION_GUARDRAIL?: Operation<boolean, EnableInsightsTransactionGuardrailVars>;
|
|
1001
|
+
DISABLE_INSIGHTS_TRANSACTION_GUARDRAIL?: Operation<boolean, DisableInsightsTransactionGuardrailVars>;
|
|
1002
|
+
DELETE_INSIGHTS_TRANSACTION?: Operation<boolean, DeleteInsightsTransactionVars>;
|
|
1003
|
+
UPSERT_INSIGHTS_POLICY?: Operation<InsightsPolicy, UpsertInsightsPolicyVars>;
|
|
1004
|
+
DELETE_INSIGHTS_POLICY?: Operation<boolean, DeleteInsightsPolicyVars>;
|
|
1005
|
+
UPSERT_INSIGHTS_LEARNING_POLICY?: Operation<InsightsLearningPolicy, UpsertInsightsLearningPolicyVars>;
|
|
1006
|
+
DELETE_INSIGHTS_LEARNING_POLICY?: Operation<boolean, DeleteInsightsLearningPolicyVars>;
|
|
1007
|
+
RESOLVE_INSIGHTS_ANOMALY?: Operation<boolean, ResolveInsightsAnomalyVars>;
|
|
1008
|
+
BULK_RESOLVE_INSIGHTS_ANOMALIES?: Operation<InsightsBulkResolveResult, BulkResolveInsightsAnomaliesVars>;
|
|
1009
|
+
UPSERT_INSIGHTS_GUARDRAIL?: Operation<InsightsGuardrail, UpsertInsightsGuardrailVars>;
|
|
1010
|
+
DELETE_INSIGHTS_GUARDRAIL?: Operation<boolean, DeleteInsightsGuardrailVars>;
|
|
1011
|
+
SEED_INSIGHTS_GUARDRAIL?: Operation<boolean, SeedInsightsGuardrailVars>;
|
|
1012
|
+
ALLOW_INSIGHTS_GUARDRAIL_VIOLATION?: Operation<boolean, InsightsViolationActionVars>;
|
|
1013
|
+
DISMISS_INSIGHTS_GUARDRAIL_VIOLATION?: Operation<boolean, InsightsViolationActionVars>;
|
|
1014
|
+
REOPEN_INSIGHTS_GUARDRAIL_VIOLATION?: Operation<boolean, InsightsViolationActionVars>;
|
|
1015
|
+
UPDATE_INSIGHTS_SYSTEM_SETTINGS?: Operation<InsightsSystemSettings, UpdateInsightsSystemSettingsVars>;
|
|
788
1016
|
}
|
|
789
1017
|
/**
|
|
790
1018
|
* 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
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import { type MinSupportedVersion, PlatformType, Tier } from '../types';
|
|
2
|
+
import { type MinSupportedVersion, type VersionThreshold, PlatformType, Tier } from '../types';
|
|
3
3
|
interface ContextProps extends PropsWithChildren {
|
|
4
4
|
platformType: PlatformType;
|
|
5
5
|
tier: Tier;
|
|
6
6
|
version: string;
|
|
7
7
|
}
|
|
8
8
|
export declare const OdigosProvider: ({ children, platformType, tier, version }: ContextProps) => React.JSX.Element;
|
|
9
|
-
export declare const resolveMinSupportedVersion: (minSupportedVersion?: MinSupportedVersion, platformType?: PlatformType) =>
|
|
9
|
+
export declare const resolveMinSupportedVersion: (minSupportedVersion?: MinSupportedVersion, platformType?: PlatformType) => VersionThreshold;
|
|
10
10
|
export declare const checkVersionSupport: (currentVersion: string, minSupportedVersion?: MinSupportedVersion, platformType?: PlatformType) => boolean;
|
|
11
11
|
export declare const useOdigos: (minSupportedVersion?: MinSupportedVersion) => {
|
|
12
12
|
isVersionSupported: boolean;
|
|
13
|
-
minSupportedVersion:
|
|
13
|
+
minSupportedVersion: VersionThreshold;
|
|
14
14
|
isK8s: boolean;
|
|
15
15
|
isVm: boolean;
|
|
16
16
|
isConnector: boolean;
|
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-D6pVu22G.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-D6pVu22G.js";export{O as OdigosProvider,c as checkVersionSupport,r as resolveMinSupportedVersion,u as useOdigos}from"./chunks/helpers-BCSEuuKh.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-D8rTJS7r.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;
|