@principal-ai/principal-view-core 0.23.13 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/registered-trace.d.ts +203 -0
- package/dist/types/registered-trace.d.ts.map +1 -0
- package/dist/types/registered-trace.js +8 -0
- package/dist/types/registered-trace.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +8 -0
- package/src/types/registered-trace.ts +298 -0
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export type { TemplateSegment, TemplateContext, TemplateValue } from './workflow
|
|
|
23
23
|
export { selectScenario, getRequiredEvents, hasEventMatching, computeAggregates, getNestedValue, setNestedValue, } from './workflow/scenario-matcher';
|
|
24
24
|
export type { WorkflowTemplate, WorkflowScenario, WorkflowMode, ScenarioTemplate, FlowDirective, LogTemplates, FormattingOptions, OtelEvent, OtelSignal, WorkflowContext, WorkflowResult, ScenarioMatchResult, ScenarioMatchDetail, EnhancedScenarioMatchResult, WorkflowMatch, SpanTreeNode, } from './workflow/types';
|
|
25
25
|
export type { OtelExportTraceServiceRequest, OtelResourceSpansData, OtelScopeSpans, OtelSpanData, OtelResourceData, OtelKeyValue, OtelAnyValue, OtelSpanEvent, OtelLink, OtelSpanStatus, OtelInstrumentationScope, TraceInfo, WorkflowMatchInfo, OtelAttributes, OtelAttributeValue, OtelLog, OtelSpan, OtelResource, OtelSeverity, OtelSeverityText, OtelSeverityNumber, } from './types/otel';
|
|
26
|
+
export type { RegisteredTrace, RegistryLookupResult, StoryboardRegistryInterface, TraceRegistryMatcher, } from './types/registered-trace';
|
|
26
27
|
export { getAttributeStringValue, findAttribute, getAttributeValue, flattenResourceAttributes, parseNanoTime, getSpanDuration, isErrorSeverity, isWarnSeverity, } from './types/otel';
|
|
27
28
|
export type { VersionIdentifier, VersionSnapshot, RegisterVersionRequest, GetVersionResponse, VersionRegistry, } from './types/version-registry';
|
|
28
29
|
export { InMemoryVersionRegistry, createInMemoryVersionRegistry } from './registry/VersionRegistry';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,YAAY,EACV,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,UAAU,GACX,MAAM,SAAS,CAAC;AAGjB,YAAY,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAG7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAGxF,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG5E,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACtF,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAI1D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC3E,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAClG,OAAO,EACL,cA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AAC9D,YAAY,EACV,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,EACV,eAAe,EACf,eAAe,EACf,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACrF,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,YAAY,EACV,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AAGtC,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,YAAY,EACZ,6BAA6B,GAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,EACtB,6BAA6B,EAC7B,aAAa,GACd,MAAM,cAAc,CAAC;AAGtB,YAAY,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAkCH,mFAAmF;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,oCAAoC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,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ware trace types
|
|
3
|
+
*
|
|
4
|
+
* These types integrate trace data with storyboard registry lookups
|
|
5
|
+
* to provide complete matching, validation, and routing information.
|
|
6
|
+
*/
|
|
7
|
+
import type { OtelExportTraceServiceRequest } from './otel';
|
|
8
|
+
/**
|
|
9
|
+
* Registry-aware trace with matching and routing information
|
|
10
|
+
*
|
|
11
|
+
* Replaces TraceInfo with a type that knows:
|
|
12
|
+
* - Whether it's matched to a registered storyboard
|
|
13
|
+
* - Which schema version should be used
|
|
14
|
+
* - Where it should be routed/displayed
|
|
15
|
+
* - Detailed span-to-node matching results
|
|
16
|
+
*/
|
|
17
|
+
export interface RegisteredTrace {
|
|
18
|
+
/** Unique trace ID */
|
|
19
|
+
traceId: string;
|
|
20
|
+
/** Trace name (typically root span name) */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Start timestamp (milliseconds) */
|
|
23
|
+
startTime: number;
|
|
24
|
+
/** End timestamp (milliseconds) */
|
|
25
|
+
endTime: number;
|
|
26
|
+
/** Duration (milliseconds) */
|
|
27
|
+
duration: number;
|
|
28
|
+
/** Number of spans in this trace */
|
|
29
|
+
spanCount: number;
|
|
30
|
+
/** Service name from resource attributes */
|
|
31
|
+
serviceName: string;
|
|
32
|
+
/** Has any span with error status */
|
|
33
|
+
hasErrors: boolean;
|
|
34
|
+
/** Instrumentation scope that created this trace */
|
|
35
|
+
scope: {
|
|
36
|
+
/** Scope name (e.g., "checkout-instrumentation") */
|
|
37
|
+
name: string;
|
|
38
|
+
/** Scope version (e.g., "2.1.0") - used for schema matching */
|
|
39
|
+
version?: string;
|
|
40
|
+
/** Scope-level attributes */
|
|
41
|
+
attributes?: Record<string, unknown>;
|
|
42
|
+
/** OTLP schema URL */
|
|
43
|
+
schemaUrl?: string;
|
|
44
|
+
};
|
|
45
|
+
/** Registry matching status */
|
|
46
|
+
registryStatus: 'matched' | 'unmatched' | 'version-mismatch' | 'not-registered' | 'error';
|
|
47
|
+
/** Match information (if trace has pv.* attributes) */
|
|
48
|
+
matchInfo?: {
|
|
49
|
+
/** Storyboard ID from trace attributes */
|
|
50
|
+
storyboardId: string;
|
|
51
|
+
/** Storyboard name from trace attributes */
|
|
52
|
+
storyboardName: string;
|
|
53
|
+
/** Workflow ID (optional) */
|
|
54
|
+
workflowId?: string;
|
|
55
|
+
/** Workflow name (optional) */
|
|
56
|
+
workflowName?: string;
|
|
57
|
+
/** Scenario ID (optional) */
|
|
58
|
+
scenarioId?: string;
|
|
59
|
+
/** Scenario name (optional) */
|
|
60
|
+
scenarioName?: string;
|
|
61
|
+
/** Resolved schema version (from scope.version or pv.schema.version) */
|
|
62
|
+
schemaVersion?: string;
|
|
63
|
+
};
|
|
64
|
+
/** Registry lookup result */
|
|
65
|
+
registry?: {
|
|
66
|
+
/** Is the storyboard registered in the registry? */
|
|
67
|
+
isRegistered: boolean;
|
|
68
|
+
/** Registered storyboard ID (may differ from matchInfo.storyboardId) */
|
|
69
|
+
storyboardId?: string;
|
|
70
|
+
/** Resolved schema version (what version was actually used) */
|
|
71
|
+
resolvedVersion?: string;
|
|
72
|
+
/** Available versions in registry */
|
|
73
|
+
availableVersions?: string[];
|
|
74
|
+
/** Latest version in registry */
|
|
75
|
+
latestVersion?: string;
|
|
76
|
+
/** Is the resolved version the latest? */
|
|
77
|
+
isLatestVersion?: boolean;
|
|
78
|
+
/** Version match status */
|
|
79
|
+
versionStatus?: 'exact-match' | 'fallback-to-latest' | 'not-found' | 'deprecated';
|
|
80
|
+
};
|
|
81
|
+
/** Per-span matching results */
|
|
82
|
+
spanMatches: Array<{
|
|
83
|
+
/** Span ID */
|
|
84
|
+
spanId: string;
|
|
85
|
+
/** Span name */
|
|
86
|
+
spanName: string;
|
|
87
|
+
/** Matched canvas node IDs */
|
|
88
|
+
matchedNodeIds: string[];
|
|
89
|
+
/** Timestamp (milliseconds) */
|
|
90
|
+
timestamp: number;
|
|
91
|
+
/** Duration (milliseconds) */
|
|
92
|
+
duration: number;
|
|
93
|
+
/** Match confidence (optional) */
|
|
94
|
+
matchConfidence?: 'exact' | 'pattern' | 'wildcard';
|
|
95
|
+
/** Unmatched reason (if no nodes matched) */
|
|
96
|
+
unmatchedReason?: 'no-criteria' | 'no-match' | 'excluded';
|
|
97
|
+
}>;
|
|
98
|
+
/** Summary of matched nodes across all spans */
|
|
99
|
+
matchedNodesSummary: {
|
|
100
|
+
/** Total unique node IDs matched */
|
|
101
|
+
totalNodesMatched: number;
|
|
102
|
+
/** Node IDs that matched */
|
|
103
|
+
matchedNodeIds: string[];
|
|
104
|
+
/** Nodes in storyboard that didn't match any span */
|
|
105
|
+
unmatchedNodeIds: string[];
|
|
106
|
+
/** Coverage percentage (matched nodes / total nodes) */
|
|
107
|
+
coveragePercent: number;
|
|
108
|
+
};
|
|
109
|
+
/** Where should this trace be routed/displayed? */
|
|
110
|
+
routing: {
|
|
111
|
+
/** Source URL for routing (from dev.server.url or service.name) */
|
|
112
|
+
sourceUrl: string;
|
|
113
|
+
/** Suggested destination (which panel/view should display this) */
|
|
114
|
+
destination: 'trace-viewer' | 'storyboard-viewer' | 'scenario-viewer' | 'unmatched';
|
|
115
|
+
/** Routing params (what to open, what to highlight) */
|
|
116
|
+
params?: {
|
|
117
|
+
/** Storyboard to open */
|
|
118
|
+
storyboardId?: string;
|
|
119
|
+
/** Workflow to select */
|
|
120
|
+
workflowId?: string;
|
|
121
|
+
/** Scenario to show */
|
|
122
|
+
scenarioId?: string;
|
|
123
|
+
/** Nodes to highlight */
|
|
124
|
+
highlightNodeIds?: string[];
|
|
125
|
+
/** Schema version to use */
|
|
126
|
+
schemaVersion?: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
/** Validation issues found during matching */
|
|
130
|
+
validationIssues?: Array<{
|
|
131
|
+
/** Issue severity */
|
|
132
|
+
level: 'error' | 'warning' | 'info';
|
|
133
|
+
/** Issue category */
|
|
134
|
+
category: 'registry' | 'version' | 'matching' | 'data';
|
|
135
|
+
/** Human-readable message */
|
|
136
|
+
message: string;
|
|
137
|
+
/** Affected span ID (if span-specific) */
|
|
138
|
+
spanId?: string;
|
|
139
|
+
/** Suggested fix */
|
|
140
|
+
suggestion?: string;
|
|
141
|
+
}>;
|
|
142
|
+
/** Reference to full OTLP data (if needed for details) */
|
|
143
|
+
otlpData?: OtelExportTraceServiceRequest;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Registry lookup result
|
|
147
|
+
*/
|
|
148
|
+
export interface RegistryLookupResult {
|
|
149
|
+
/** Is the storyboard registered? */
|
|
150
|
+
isRegistered: boolean;
|
|
151
|
+
/** Storyboard ID */
|
|
152
|
+
storyboardId?: string;
|
|
153
|
+
/** Resolved schema version */
|
|
154
|
+
resolvedVersion?: string;
|
|
155
|
+
/** Available versions */
|
|
156
|
+
availableVersions?: string[];
|
|
157
|
+
/** Latest version */
|
|
158
|
+
latestVersion?: string;
|
|
159
|
+
/** Is latest version? */
|
|
160
|
+
isLatestVersion?: boolean;
|
|
161
|
+
/** Version match status */
|
|
162
|
+
versionStatus?: 'exact-match' | 'fallback-to-latest' | 'not-found' | 'deprecated';
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Interface for storyboard registry
|
|
166
|
+
*
|
|
167
|
+
* This is implemented by the main process and injected into the
|
|
168
|
+
* OTEL collector server for trace matching.
|
|
169
|
+
*/
|
|
170
|
+
export interface StoryboardRegistryInterface {
|
|
171
|
+
/**
|
|
172
|
+
* Look up a storyboard by ID and optional version
|
|
173
|
+
*/
|
|
174
|
+
lookup(storyboardId: string, schemaVersion?: string): Promise<RegistryLookupResult>;
|
|
175
|
+
/**
|
|
176
|
+
* Get list of registered storyboard IDs
|
|
177
|
+
*/
|
|
178
|
+
listStoryboards(): Promise<string[]>;
|
|
179
|
+
/**
|
|
180
|
+
* Check if a storyboard is registered
|
|
181
|
+
*/
|
|
182
|
+
isRegistered(storyboardId: string): Promise<boolean>;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Interface for trace registry matcher
|
|
186
|
+
*
|
|
187
|
+
* Converts OTLP traces to RegisteredTrace with full registry information.
|
|
188
|
+
*/
|
|
189
|
+
export interface TraceRegistryMatcher {
|
|
190
|
+
/**
|
|
191
|
+
* Match a trace against the registry and enrich with routing info
|
|
192
|
+
*/
|
|
193
|
+
matchTrace(otlpData: OtelExportTraceServiceRequest): Promise<RegisteredTrace>;
|
|
194
|
+
/**
|
|
195
|
+
* Resolve schema version for a trace
|
|
196
|
+
*/
|
|
197
|
+
resolveSchemaVersion(storyboardId: string, scopeVersion?: string, scopeAttributes?: Record<string, unknown>): Promise<{
|
|
198
|
+
resolvedVersion?: string;
|
|
199
|
+
versionStatus: 'exact-match' | 'fallback-to-latest' | 'not-found';
|
|
200
|
+
availableVersions: string[];
|
|
201
|
+
}>;
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=registered-trace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registered-trace.d.ts","sourceRoot":"","sources":["../../src/types/registered-trace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,QAAQ,CAAC;AAE5D;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAK9B,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAEhB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IAEb,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAElB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAEhB,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAC;IAEjB,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAElB,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IAEpB,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAC;IAMnB,oDAAoD;IACpD,KAAK,EAAE;QACL,oDAAoD;QACpD,IAAI,EAAE,MAAM,CAAC;QAEb,+DAA+D;QAC/D,OAAO,C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,EACpB,YAAY,CAAC,EAAE,MAAM,EACrB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACxC,OAAO,CAAC;QACT,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,aAAa,EAAE,aAAa,GAAG,oBAAoB,GAAG,WAAW,CAAC;QAClE,iBAAiB,EAAE,MAAM,EAAE,CAAC;KAC7B,CAAC,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registered-trace.js","sourceRoot":"","sources":["../../src/types/registered-trace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -114,6 +114,14 @@ export type {
|
|
|
114
114
|
OtelSeverityNumber,
|
|
115
115
|
} from './types/otel';
|
|
116
116
|
|
|
117
|
+
// Export registry-aware trace types
|
|
118
|
+
export type {
|
|
119
|
+
RegisteredTrace,
|
|
120
|
+
RegistryLookupResult,
|
|
121
|
+
StoryboardRegistryInterface,
|
|
122
|
+
TraceRegistryMatcher,
|
|
123
|
+
} from './types/registered-trace';
|
|
124
|
+
|
|
117
125
|
// Export OTEL helper functions
|
|
118
126
|
export {
|
|
119
127
|
getAttributeStringValue,
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry-aware trace types
|
|
3
|
+
*
|
|
4
|
+
* These types integrate trace data with storyboard registry lookups
|
|
5
|
+
* to provide complete matching, validation, and routing information.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { OtelExportTraceServiceRequest } from './otel';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Registry-aware trace with matching and routing information
|
|
12
|
+
*
|
|
13
|
+
* Replaces TraceInfo with a type that knows:
|
|
14
|
+
* - Whether it's matched to a registered storyboard
|
|
15
|
+
* - Which schema version should be used
|
|
16
|
+
* - Where it should be routed/displayed
|
|
17
|
+
* - Detailed span-to-node matching results
|
|
18
|
+
*/
|
|
19
|
+
export interface RegisteredTrace {
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// Core Trace Identity
|
|
22
|
+
// ============================================================================
|
|
23
|
+
|
|
24
|
+
/** Unique trace ID */
|
|
25
|
+
traceId: string;
|
|
26
|
+
|
|
27
|
+
/** Trace name (typically root span name) */
|
|
28
|
+
name: string;
|
|
29
|
+
|
|
30
|
+
/** Start timestamp (milliseconds) */
|
|
31
|
+
startTime: number;
|
|
32
|
+
|
|
33
|
+
/** End timestamp (milliseconds) */
|
|
34
|
+
endTime: number;
|
|
35
|
+
|
|
36
|
+
/** Duration (milliseconds) */
|
|
37
|
+
duration: number;
|
|
38
|
+
|
|
39
|
+
/** Number of spans in this trace */
|
|
40
|
+
spanCount: number;
|
|
41
|
+
|
|
42
|
+
/** Service name from resource attributes */
|
|
43
|
+
serviceName: string;
|
|
44
|
+
|
|
45
|
+
/** Has any span with error status */
|
|
46
|
+
hasErrors: boolean;
|
|
47
|
+
|
|
48
|
+
// ============================================================================
|
|
49
|
+
// Instrumentation Scope (for versioning)
|
|
50
|
+
// ============================================================================
|
|
51
|
+
|
|
52
|
+
/** Instrumentation scope that created this trace */
|
|
53
|
+
scope: {
|
|
54
|
+
/** Scope name (e.g., "checkout-instrumentation") */
|
|
55
|
+
name: string;
|
|
56
|
+
|
|
57
|
+
/** Scope version (e.g., "2.1.0") - used for schema matching */
|
|
58
|
+
version?: string;
|
|
59
|
+
|
|
60
|
+
/** Scope-level attributes */
|
|
61
|
+
attributes?: Record<string, unknown>;
|
|
62
|
+
|
|
63
|
+
/** OTLP schema URL */
|
|
64
|
+
schemaUrl?: string;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// ============================================================================
|
|
68
|
+
// Registry Matching Status
|
|
69
|
+
// ============================================================================
|
|
70
|
+
|
|
71
|
+
/** Registry matching status */
|
|
72
|
+
registryStatus: 'matched' | 'unmatched' | 'version-mismatch' | 'not-registered' | 'error';
|
|
73
|
+
|
|
74
|
+
/** Match information (if trace has pv.* attributes) */
|
|
75
|
+
matchInfo?: {
|
|
76
|
+
/** Storyboard ID from trace attributes */
|
|
77
|
+
storyboardId: string;
|
|
78
|
+
|
|
79
|
+
/** Storyboard name from trace attributes */
|
|
80
|
+
storyboardName: string;
|
|
81
|
+
|
|
82
|
+
/** Workflow ID (optional) */
|
|
83
|
+
workflowId?: string;
|
|
84
|
+
|
|
85
|
+
/** Workflow name (optional) */
|
|
86
|
+
workflowName?: string;
|
|
87
|
+
|
|
88
|
+
/** Scenario ID (optional) */
|
|
89
|
+
scenarioId?: string;
|
|
90
|
+
|
|
91
|
+
/** Scenario name (optional) */
|
|
92
|
+
scenarioName?: string;
|
|
93
|
+
|
|
94
|
+
/** Resolved schema version (from scope.version or pv.schema.version) */
|
|
95
|
+
schemaVersion?: string;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/** Registry lookup result */
|
|
99
|
+
registry?: {
|
|
100
|
+
/** Is the storyboard registered in the registry? */
|
|
101
|
+
isRegistered: boolean;
|
|
102
|
+
|
|
103
|
+
/** Registered storyboard ID (may differ from matchInfo.storyboardId) */
|
|
104
|
+
storyboardId?: string;
|
|
105
|
+
|
|
106
|
+
/** Resolved schema version (what version was actually used) */
|
|
107
|
+
resolvedVersion?: string;
|
|
108
|
+
|
|
109
|
+
/** Available versions in registry */
|
|
110
|
+
availableVersions?: string[];
|
|
111
|
+
|
|
112
|
+
/** Latest version in registry */
|
|
113
|
+
latestVersion?: string;
|
|
114
|
+
|
|
115
|
+
/** Is the resolved version the latest? */
|
|
116
|
+
isLatestVersion?: boolean;
|
|
117
|
+
|
|
118
|
+
/** Version match status */
|
|
119
|
+
versionStatus?: 'exact-match' | 'fallback-to-latest' | 'not-found' | 'deprecated';
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
// ============================================================================
|
|
123
|
+
// Span Matching Results
|
|
124
|
+
// ============================================================================
|
|
125
|
+
|
|
126
|
+
/** Per-span matching results */
|
|
127
|
+
spanMatches: Array<{
|
|
128
|
+
/** Span ID */
|
|
129
|
+
spanId: string;
|
|
130
|
+
|
|
131
|
+
/** Span name */
|
|
132
|
+
spanName: string;
|
|
133
|
+
|
|
134
|
+
/** Matched canvas node IDs */
|
|
135
|
+
matchedNodeIds: string[];
|
|
136
|
+
|
|
137
|
+
/** Timestamp (milliseconds) */
|
|
138
|
+
timestamp: number;
|
|
139
|
+
|
|
140
|
+
/** Duration (milliseconds) */
|
|
141
|
+
duration: number;
|
|
142
|
+
|
|
143
|
+
/** Match confidence (optional) */
|
|
144
|
+
matchConfidence?: 'exact' | 'pattern' | 'wildcard';
|
|
145
|
+
|
|
146
|
+
/** Unmatched reason (if no nodes matched) */
|
|
147
|
+
unmatchedReason?: 'no-criteria' | 'no-match' | 'excluded';
|
|
148
|
+
}>;
|
|
149
|
+
|
|
150
|
+
/** Summary of matched nodes across all spans */
|
|
151
|
+
matchedNodesSummary: {
|
|
152
|
+
/** Total unique node IDs matched */
|
|
153
|
+
totalNodesMatched: number;
|
|
154
|
+
|
|
155
|
+
/** Node IDs that matched */
|
|
156
|
+
matchedNodeIds: string[];
|
|
157
|
+
|
|
158
|
+
/** Nodes in storyboard that didn't match any span */
|
|
159
|
+
unmatchedNodeIds: string[];
|
|
160
|
+
|
|
161
|
+
/** Coverage percentage (matched nodes / total nodes) */
|
|
162
|
+
coveragePercent: number;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// ============================================================================
|
|
166
|
+
// Routing Information
|
|
167
|
+
// ============================================================================
|
|
168
|
+
|
|
169
|
+
/** Where should this trace be routed/displayed? */
|
|
170
|
+
routing: {
|
|
171
|
+
/** Source URL for routing (from dev.server.url or service.name) */
|
|
172
|
+
sourceUrl: string;
|
|
173
|
+
|
|
174
|
+
/** Suggested destination (which panel/view should display this) */
|
|
175
|
+
destination: 'trace-viewer' | 'storyboard-viewer' | 'scenario-viewer' | 'unmatched';
|
|
176
|
+
|
|
177
|
+
/** Routing params (what to open, what to highlight) */
|
|
178
|
+
params?: {
|
|
179
|
+
/** Storyboard to open */
|
|
180
|
+
storyboardId?: string;
|
|
181
|
+
|
|
182
|
+
/** Workflow to select */
|
|
183
|
+
workflowId?: string;
|
|
184
|
+
|
|
185
|
+
/** Scenario to show */
|
|
186
|
+
scenarioId?: string;
|
|
187
|
+
|
|
188
|
+
/** Nodes to highlight */
|
|
189
|
+
highlightNodeIds?: string[];
|
|
190
|
+
|
|
191
|
+
/** Schema version to use */
|
|
192
|
+
schemaVersion?: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
// ============================================================================
|
|
197
|
+
// Validation Errors/Warnings
|
|
198
|
+
// ============================================================================
|
|
199
|
+
|
|
200
|
+
/** Validation issues found during matching */
|
|
201
|
+
validationIssues?: Array<{
|
|
202
|
+
/** Issue severity */
|
|
203
|
+
level: 'error' | 'warning' | 'info';
|
|
204
|
+
|
|
205
|
+
/** Issue category */
|
|
206
|
+
category: 'registry' | 'version' | 'matching' | 'data';
|
|
207
|
+
|
|
208
|
+
/** Human-readable message */
|
|
209
|
+
message: string;
|
|
210
|
+
|
|
211
|
+
/** Affected span ID (if span-specific) */
|
|
212
|
+
spanId?: string;
|
|
213
|
+
|
|
214
|
+
/** Suggested fix */
|
|
215
|
+
suggestion?: string;
|
|
216
|
+
}>;
|
|
217
|
+
|
|
218
|
+
// ============================================================================
|
|
219
|
+
// Raw Data Reference (for details view)
|
|
220
|
+
// ============================================================================
|
|
221
|
+
|
|
222
|
+
/** Reference to full OTLP data (if needed for details) */
|
|
223
|
+
otlpData?: OtelExportTraceServiceRequest;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Registry lookup result
|
|
228
|
+
*/
|
|
229
|
+
export interface RegistryLookupResult {
|
|
230
|
+
/** Is the storyboard registered? */
|
|
231
|
+
isRegistered: boolean;
|
|
232
|
+
|
|
233
|
+
/** Storyboard ID */
|
|
234
|
+
storyboardId?: string;
|
|
235
|
+
|
|
236
|
+
/** Resolved schema version */
|
|
237
|
+
resolvedVersion?: string;
|
|
238
|
+
|
|
239
|
+
/** Available versions */
|
|
240
|
+
availableVersions?: string[];
|
|
241
|
+
|
|
242
|
+
/** Latest version */
|
|
243
|
+
latestVersion?: string;
|
|
244
|
+
|
|
245
|
+
/** Is latest version? */
|
|
246
|
+
isLatestVersion?: boolean;
|
|
247
|
+
|
|
248
|
+
/** Version match status */
|
|
249
|
+
versionStatus?: 'exact-match' | 'fallback-to-latest' | 'not-found' | 'deprecated';
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Interface for storyboard registry
|
|
254
|
+
*
|
|
255
|
+
* This is implemented by the main process and injected into the
|
|
256
|
+
* OTEL collector server for trace matching.
|
|
257
|
+
*/
|
|
258
|
+
export interface StoryboardRegistryInterface {
|
|
259
|
+
/**
|
|
260
|
+
* Look up a storyboard by ID and optional version
|
|
261
|
+
*/
|
|
262
|
+
lookup(storyboardId: string, schemaVersion?: string): Promise<RegistryLookupResult>;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Get list of registered storyboard IDs
|
|
266
|
+
*/
|
|
267
|
+
listStoryboards(): Promise<string[]>;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Check if a storyboard is registered
|
|
271
|
+
*/
|
|
272
|
+
isRegistered(storyboardId: string): Promise<boolean>;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Interface for trace registry matcher
|
|
277
|
+
*
|
|
278
|
+
* Converts OTLP traces to RegisteredTrace with full registry information.
|
|
279
|
+
*/
|
|
280
|
+
export interface TraceRegistryMatcher {
|
|
281
|
+
/**
|
|
282
|
+
* Match a trace against the registry and enrich with routing info
|
|
283
|
+
*/
|
|
284
|
+
matchTrace(otlpData: OtelExportTraceServiceRequest): Promise<RegisteredTrace>;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Resolve schema version for a trace
|
|
288
|
+
*/
|
|
289
|
+
resolveSchemaVersion(
|
|
290
|
+
storyboardId: string,
|
|
291
|
+
scopeVersion?: string,
|
|
292
|
+
scopeAttributes?: Record<string, unknown>
|
|
293
|
+
): Promise<{
|
|
294
|
+
resolvedVersion?: string;
|
|
295
|
+
versionStatus: 'exact-match' | 'fallback-to-latest' | 'not-found';
|
|
296
|
+
availableVersions: string[];
|
|
297
|
+
}>;
|
|
298
|
+
}
|