autotel-devtools 6.2.0 → 7.0.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.
@@ -1,182 +0,0 @@
1
- import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
2
- import { ExportResult } from '@opentelemetry/core';
3
- import { Server } from 'node:http';
4
-
5
- interface SpanData {
6
- traceId: string;
7
- spanId: string;
8
- parentSpanId?: string;
9
- name: string;
10
- kind: 'INTERNAL' | 'SERVER' | 'CLIENT' | 'PRODUCER' | 'CONSUMER';
11
- startTime: number;
12
- endTime: number;
13
- duration: number;
14
- attributes: Record<string, any>;
15
- status: {
16
- code: 'OK' | 'ERROR' | 'UNSET';
17
- message?: string;
18
- };
19
- events?: Array<{
20
- name: string;
21
- timestamp: number;
22
- attributes?: Record<string, any>;
23
- }>;
24
- }
25
- interface TraceData {
26
- traceId: string;
27
- correlationId: string;
28
- rootSpan: SpanData;
29
- spans: SpanData[];
30
- startTime: number;
31
- endTime: number;
32
- duration: number;
33
- status: 'OK' | 'ERROR' | 'UNSET';
34
- service: string;
35
- }
36
- interface LogData {
37
- id: string;
38
- traceId?: string;
39
- spanId?: string;
40
- resourceName?: string;
41
- severityText?: string;
42
- severityNumber?: number;
43
- body: string | Record<string, unknown>;
44
- timestamp: number;
45
- attributes?: Record<string, unknown>;
46
- resource?: Record<string, unknown>;
47
- }
48
- interface MetricData {
49
- type: 'event' | 'funnel' | 'outcome' | 'value';
50
- name: string;
51
- value?: number;
52
- attributes: Record<string, any>;
53
- timestamp: number;
54
- traceId?: string;
55
- }
56
- interface ErrorGroup {
57
- fingerprint: string;
58
- type: string;
59
- message: string;
60
- stackTrace?: string;
61
- count: number;
62
- firstSeen: number;
63
- lastSeen: number;
64
- affectedTraces: string[];
65
- affectedSpans: string[];
66
- service?: string;
67
- attributes?: Record<string, unknown>;
68
- }
69
- interface ErrorOccurrence {
70
- traceId: string;
71
- spanId: string;
72
- spanName: string;
73
- service: string;
74
- timestamp: number;
75
- error: {
76
- type: string;
77
- message: string;
78
- stackTrace?: string;
79
- };
80
- attributes?: Record<string, unknown>;
81
- }
82
- interface EntityIndexData {
83
- rootDir: string;
84
- scannedAt: number;
85
- entityCount: number;
86
- typeCounts: Record<string, number>;
87
- edges: Array<{
88
- parentIndex: number;
89
- childIndex: number;
90
- }>;
91
- entities: Array<{
92
- entityType: string;
93
- idAttrs: Record<string, string>;
94
- descAttrs: Record<string, string>;
95
- confidence: 'high' | 'medium' | 'low';
96
- sources: Array<{
97
- file: string;
98
- line: number;
99
- }>;
100
- }>;
101
- }
102
- interface DevtoolsData {
103
- traces: TraceData[];
104
- metrics: MetricData[];
105
- logs: LogData[];
106
- errors: ErrorGroup[];
107
- entityIndex?: EntityIndexData;
108
- }
109
-
110
- interface DevtoolsServerOptions {
111
- port?: number;
112
- server?: Server;
113
- path?: string;
114
- verbose?: boolean;
115
- maxHistory?: number;
116
- maxTraceCount?: number;
117
- maxLogCount?: number;
118
- maxMetricCount?: number;
119
- }
120
- declare class DevtoolsServer {
121
- private wss;
122
- private clients;
123
- private httpServer;
124
- private traces;
125
- private logs;
126
- private metrics;
127
- private errorAggregator;
128
- private entityIndex;
129
- private limits;
130
- private verbose;
131
- private _port;
132
- constructor(options?: DevtoolsServerOptions);
133
- get port(): number;
134
- get clientCount(): number;
135
- addTrace(trace: TraceData): void;
136
- addTraces(traces: TraceData[]): void;
137
- addLog(log: LogData): void;
138
- addLogs(logs: LogData[]): void;
139
- addMetric(metric: MetricData): void;
140
- getCurrentData(): DevtoolsData;
141
- setEntityIndex(entityIndex: EntityIndexData): void;
142
- clearData(): void;
143
- private broadcast;
144
- private log;
145
- close(): Promise<void>;
146
- }
147
-
148
- /**
149
- * OpenTelemetry SpanExporter that streams spans to DevtoolsServer
150
- */
151
-
152
- declare class DevtoolsSpanExporter implements SpanExporter {
153
- private server;
154
- private serviceName;
155
- constructor(server: DevtoolsServer, serviceName?: string);
156
- /**
157
- * Export spans to the WebSocket server
158
- */
159
- export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): Promise<void>;
160
- /**
161
- * Shutdown the exporter
162
- */
163
- shutdown(): Promise<void>;
164
- /**
165
- * Force flush any buffered spans
166
- */
167
- forceFlush(): Promise<void>;
168
- /**
169
- * Convert OpenTelemetry spans to TraceData
170
- */
171
- private convertToTraceData;
172
- /**
173
- * Convert OpenTelemetry span to SpanData
174
- */
175
- private convertSpan;
176
- /**
177
- * Convert OpenTelemetry SpanKind to string
178
- */
179
- private convertSpanKind;
180
- }
181
-
182
- export { DevtoolsServer as D, type ErrorGroup as E, type LogData as L, type MetricData as M, type SpanData as S, type TraceData as T, DevtoolsSpanExporter as a, type DevtoolsData as b, type ErrorOccurrence as c, type EntityIndexData as d, type DevtoolsServerOptions as e };
@@ -1,182 +0,0 @@
1
- import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
2
- import { ExportResult } from '@opentelemetry/core';
3
- import { Server } from 'node:http';
4
-
5
- interface SpanData {
6
- traceId: string;
7
- spanId: string;
8
- parentSpanId?: string;
9
- name: string;
10
- kind: 'INTERNAL' | 'SERVER' | 'CLIENT' | 'PRODUCER' | 'CONSUMER';
11
- startTime: number;
12
- endTime: number;
13
- duration: number;
14
- attributes: Record<string, any>;
15
- status: {
16
- code: 'OK' | 'ERROR' | 'UNSET';
17
- message?: string;
18
- };
19
- events?: Array<{
20
- name: string;
21
- timestamp: number;
22
- attributes?: Record<string, any>;
23
- }>;
24
- }
25
- interface TraceData {
26
- traceId: string;
27
- correlationId: string;
28
- rootSpan: SpanData;
29
- spans: SpanData[];
30
- startTime: number;
31
- endTime: number;
32
- duration: number;
33
- status: 'OK' | 'ERROR' | 'UNSET';
34
- service: string;
35
- }
36
- interface LogData {
37
- id: string;
38
- traceId?: string;
39
- spanId?: string;
40
- resourceName?: string;
41
- severityText?: string;
42
- severityNumber?: number;
43
- body: string | Record<string, unknown>;
44
- timestamp: number;
45
- attributes?: Record<string, unknown>;
46
- resource?: Record<string, unknown>;
47
- }
48
- interface MetricData {
49
- type: 'event' | 'funnel' | 'outcome' | 'value';
50
- name: string;
51
- value?: number;
52
- attributes: Record<string, any>;
53
- timestamp: number;
54
- traceId?: string;
55
- }
56
- interface ErrorGroup {
57
- fingerprint: string;
58
- type: string;
59
- message: string;
60
- stackTrace?: string;
61
- count: number;
62
- firstSeen: number;
63
- lastSeen: number;
64
- affectedTraces: string[];
65
- affectedSpans: string[];
66
- service?: string;
67
- attributes?: Record<string, unknown>;
68
- }
69
- interface ErrorOccurrence {
70
- traceId: string;
71
- spanId: string;
72
- spanName: string;
73
- service: string;
74
- timestamp: number;
75
- error: {
76
- type: string;
77
- message: string;
78
- stackTrace?: string;
79
- };
80
- attributes?: Record<string, unknown>;
81
- }
82
- interface EntityIndexData {
83
- rootDir: string;
84
- scannedAt: number;
85
- entityCount: number;
86
- typeCounts: Record<string, number>;
87
- edges: Array<{
88
- parentIndex: number;
89
- childIndex: number;
90
- }>;
91
- entities: Array<{
92
- entityType: string;
93
- idAttrs: Record<string, string>;
94
- descAttrs: Record<string, string>;
95
- confidence: 'high' | 'medium' | 'low';
96
- sources: Array<{
97
- file: string;
98
- line: number;
99
- }>;
100
- }>;
101
- }
102
- interface DevtoolsData {
103
- traces: TraceData[];
104
- metrics: MetricData[];
105
- logs: LogData[];
106
- errors: ErrorGroup[];
107
- entityIndex?: EntityIndexData;
108
- }
109
-
110
- interface DevtoolsServerOptions {
111
- port?: number;
112
- server?: Server;
113
- path?: string;
114
- verbose?: boolean;
115
- maxHistory?: number;
116
- maxTraceCount?: number;
117
- maxLogCount?: number;
118
- maxMetricCount?: number;
119
- }
120
- declare class DevtoolsServer {
121
- private wss;
122
- private clients;
123
- private httpServer;
124
- private traces;
125
- private logs;
126
- private metrics;
127
- private errorAggregator;
128
- private entityIndex;
129
- private limits;
130
- private verbose;
131
- private _port;
132
- constructor(options?: DevtoolsServerOptions);
133
- get port(): number;
134
- get clientCount(): number;
135
- addTrace(trace: TraceData): void;
136
- addTraces(traces: TraceData[]): void;
137
- addLog(log: LogData): void;
138
- addLogs(logs: LogData[]): void;
139
- addMetric(metric: MetricData): void;
140
- getCurrentData(): DevtoolsData;
141
- setEntityIndex(entityIndex: EntityIndexData): void;
142
- clearData(): void;
143
- private broadcast;
144
- private log;
145
- close(): Promise<void>;
146
- }
147
-
148
- /**
149
- * OpenTelemetry SpanExporter that streams spans to DevtoolsServer
150
- */
151
-
152
- declare class DevtoolsSpanExporter implements SpanExporter {
153
- private server;
154
- private serviceName;
155
- constructor(server: DevtoolsServer, serviceName?: string);
156
- /**
157
- * Export spans to the WebSocket server
158
- */
159
- export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): Promise<void>;
160
- /**
161
- * Shutdown the exporter
162
- */
163
- shutdown(): Promise<void>;
164
- /**
165
- * Force flush any buffered spans
166
- */
167
- forceFlush(): Promise<void>;
168
- /**
169
- * Convert OpenTelemetry spans to TraceData
170
- */
171
- private convertToTraceData;
172
- /**
173
- * Convert OpenTelemetry span to SpanData
174
- */
175
- private convertSpan;
176
- /**
177
- * Convert OpenTelemetry SpanKind to string
178
- */
179
- private convertSpanKind;
180
- }
181
-
182
- export { DevtoolsServer as D, type ErrorGroup as E, type LogData as L, type MetricData as M, type SpanData as S, type TraceData as T, DevtoolsSpanExporter as a, type DevtoolsData as b, type ErrorOccurrence as c, type EntityIndexData as d, type DevtoolsServerOptions as e };
@@ -1,164 +0,0 @@
1
- import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
2
- import { ExportResult } from '@opentelemetry/core';
3
- import { Server } from 'node:http';
4
-
5
- interface SpanData {
6
- traceId: string;
7
- spanId: string;
8
- parentSpanId?: string;
9
- name: string;
10
- kind: 'INTERNAL' | 'SERVER' | 'CLIENT' | 'PRODUCER' | 'CONSUMER';
11
- startTime: number;
12
- endTime: number;
13
- duration: number;
14
- attributes: Record<string, any>;
15
- status: {
16
- code: 'OK' | 'ERROR' | 'UNSET';
17
- message?: string;
18
- };
19
- events?: Array<{
20
- name: string;
21
- timestamp: number;
22
- attributes?: Record<string, any>;
23
- }>;
24
- links?: Array<{
25
- traceId: string;
26
- spanId: string;
27
- attributes?: Record<string, any>;
28
- }>;
29
- }
30
- interface TraceData {
31
- traceId: string;
32
- correlationId: string;
33
- rootSpan: SpanData;
34
- spans: SpanData[];
35
- startTime: number;
36
- endTime: number;
37
- duration: number;
38
- status: 'OK' | 'ERROR' | 'UNSET';
39
- service: string;
40
- }
41
- interface LogData {
42
- id: string;
43
- traceId?: string;
44
- spanId?: string;
45
- resourceName?: string;
46
- severityText?: string;
47
- severityNumber?: number;
48
- body: string | Record<string, unknown>;
49
- timestamp: number;
50
- attributes?: Record<string, unknown>;
51
- resource?: Record<string, unknown>;
52
- }
53
- interface MetricData {
54
- type: 'event' | 'funnel' | 'outcome' | 'value';
55
- name: string;
56
- value?: number;
57
- attributes: Record<string, any>;
58
- timestamp: number;
59
- traceId?: string;
60
- }
61
- interface ErrorGroup {
62
- fingerprint: string;
63
- type: string;
64
- message: string;
65
- stackTrace?: string;
66
- count: number;
67
- firstSeen: number;
68
- lastSeen: number;
69
- affectedTraces: string[];
70
- affectedSpans: string[];
71
- service?: string;
72
- attributes?: Record<string, unknown>;
73
- }
74
- interface ErrorOccurrence {
75
- traceId: string;
76
- spanId: string;
77
- spanName: string;
78
- service: string;
79
- timestamp: number;
80
- error: {
81
- type: string;
82
- message: string;
83
- stackTrace?: string;
84
- };
85
- attributes?: Record<string, unknown>;
86
- }
87
- interface DevtoolsData {
88
- traces: TraceData[];
89
- metrics: MetricData[];
90
- logs: LogData[];
91
- errors: ErrorGroup[];
92
- }
93
-
94
- interface DevtoolsServerOptions {
95
- port?: number;
96
- server?: Server;
97
- path?: string;
98
- verbose?: boolean;
99
- maxHistory?: number;
100
- maxTraceCount?: number;
101
- maxLogCount?: number;
102
- maxMetricCount?: number;
103
- }
104
- declare class DevtoolsServer {
105
- private wss;
106
- private clients;
107
- private httpServer;
108
- private traces;
109
- private logs;
110
- private metrics;
111
- private errorAggregator;
112
- private limits;
113
- private verbose;
114
- private _port;
115
- constructor(options?: DevtoolsServerOptions);
116
- get port(): number;
117
- get clientCount(): number;
118
- addTrace(trace: TraceData): void;
119
- addTraces(traces: TraceData[]): void;
120
- addLog(log: LogData): void;
121
- addLogs(logs: LogData[]): void;
122
- addMetric(metric: MetricData): void;
123
- getCurrentData(): DevtoolsData;
124
- clearData(): void;
125
- private broadcast;
126
- private log;
127
- close(): Promise<void>;
128
- }
129
-
130
- /**
131
- * OpenTelemetry SpanExporter that streams spans to DevtoolsServer
132
- */
133
-
134
- declare class DevtoolsSpanExporter implements SpanExporter {
135
- private server;
136
- private serviceName;
137
- constructor(server: DevtoolsServer, serviceName?: string);
138
- /**
139
- * Export spans to the WebSocket server
140
- */
141
- export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): Promise<void>;
142
- /**
143
- * Shutdown the exporter
144
- */
145
- shutdown(): Promise<void>;
146
- /**
147
- * Force flush any buffered spans
148
- */
149
- forceFlush(): Promise<void>;
150
- /**
151
- * Convert OpenTelemetry spans to TraceData
152
- */
153
- private convertToTraceData;
154
- /**
155
- * Convert OpenTelemetry span to SpanData
156
- */
157
- private convertSpan;
158
- /**
159
- * Convert OpenTelemetry SpanKind to string
160
- */
161
- private convertSpanKind;
162
- }
163
-
164
- export { DevtoolsServer as D, type ErrorGroup as E, type LogData as L, type MetricData as M, type SpanData as S, type TraceData as T, DevtoolsSpanExporter as a, type DevtoolsData as b, type ErrorOccurrence as c, type DevtoolsServerOptions as d };
@@ -1,164 +0,0 @@
1
- import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
2
- import { ExportResult } from '@opentelemetry/core';
3
- import { Server } from 'node:http';
4
-
5
- interface SpanData {
6
- traceId: string;
7
- spanId: string;
8
- parentSpanId?: string;
9
- name: string;
10
- kind: 'INTERNAL' | 'SERVER' | 'CLIENT' | 'PRODUCER' | 'CONSUMER';
11
- startTime: number;
12
- endTime: number;
13
- duration: number;
14
- attributes: Record<string, any>;
15
- status: {
16
- code: 'OK' | 'ERROR' | 'UNSET';
17
- message?: string;
18
- };
19
- events?: Array<{
20
- name: string;
21
- timestamp: number;
22
- attributes?: Record<string, any>;
23
- }>;
24
- links?: Array<{
25
- traceId: string;
26
- spanId: string;
27
- attributes?: Record<string, any>;
28
- }>;
29
- }
30
- interface TraceData {
31
- traceId: string;
32
- correlationId: string;
33
- rootSpan: SpanData;
34
- spans: SpanData[];
35
- startTime: number;
36
- endTime: number;
37
- duration: number;
38
- status: 'OK' | 'ERROR' | 'UNSET';
39
- service: string;
40
- }
41
- interface LogData {
42
- id: string;
43
- traceId?: string;
44
- spanId?: string;
45
- resourceName?: string;
46
- severityText?: string;
47
- severityNumber?: number;
48
- body: string | Record<string, unknown>;
49
- timestamp: number;
50
- attributes?: Record<string, unknown>;
51
- resource?: Record<string, unknown>;
52
- }
53
- interface MetricData {
54
- type: 'event' | 'funnel' | 'outcome' | 'value';
55
- name: string;
56
- value?: number;
57
- attributes: Record<string, any>;
58
- timestamp: number;
59
- traceId?: string;
60
- }
61
- interface ErrorGroup {
62
- fingerprint: string;
63
- type: string;
64
- message: string;
65
- stackTrace?: string;
66
- count: number;
67
- firstSeen: number;
68
- lastSeen: number;
69
- affectedTraces: string[];
70
- affectedSpans: string[];
71
- service?: string;
72
- attributes?: Record<string, unknown>;
73
- }
74
- interface ErrorOccurrence {
75
- traceId: string;
76
- spanId: string;
77
- spanName: string;
78
- service: string;
79
- timestamp: number;
80
- error: {
81
- type: string;
82
- message: string;
83
- stackTrace?: string;
84
- };
85
- attributes?: Record<string, unknown>;
86
- }
87
- interface DevtoolsData {
88
- traces: TraceData[];
89
- metrics: MetricData[];
90
- logs: LogData[];
91
- errors: ErrorGroup[];
92
- }
93
-
94
- interface DevtoolsServerOptions {
95
- port?: number;
96
- server?: Server;
97
- path?: string;
98
- verbose?: boolean;
99
- maxHistory?: number;
100
- maxTraceCount?: number;
101
- maxLogCount?: number;
102
- maxMetricCount?: number;
103
- }
104
- declare class DevtoolsServer {
105
- private wss;
106
- private clients;
107
- private httpServer;
108
- private traces;
109
- private logs;
110
- private metrics;
111
- private errorAggregator;
112
- private limits;
113
- private verbose;
114
- private _port;
115
- constructor(options?: DevtoolsServerOptions);
116
- get port(): number;
117
- get clientCount(): number;
118
- addTrace(trace: TraceData): void;
119
- addTraces(traces: TraceData[]): void;
120
- addLog(log: LogData): void;
121
- addLogs(logs: LogData[]): void;
122
- addMetric(metric: MetricData): void;
123
- getCurrentData(): DevtoolsData;
124
- clearData(): void;
125
- private broadcast;
126
- private log;
127
- close(): Promise<void>;
128
- }
129
-
130
- /**
131
- * OpenTelemetry SpanExporter that streams spans to DevtoolsServer
132
- */
133
-
134
- declare class DevtoolsSpanExporter implements SpanExporter {
135
- private server;
136
- private serviceName;
137
- constructor(server: DevtoolsServer, serviceName?: string);
138
- /**
139
- * Export spans to the WebSocket server
140
- */
141
- export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): Promise<void>;
142
- /**
143
- * Shutdown the exporter
144
- */
145
- shutdown(): Promise<void>;
146
- /**
147
- * Force flush any buffered spans
148
- */
149
- forceFlush(): Promise<void>;
150
- /**
151
- * Convert OpenTelemetry spans to TraceData
152
- */
153
- private convertToTraceData;
154
- /**
155
- * Convert OpenTelemetry span to SpanData
156
- */
157
- private convertSpan;
158
- /**
159
- * Convert OpenTelemetry SpanKind to string
160
- */
161
- private convertSpanKind;
162
- }
163
-
164
- export { DevtoolsServer as D, type ErrorGroup as E, type LogData as L, type MetricData as M, type SpanData as S, type TraceData as T, DevtoolsSpanExporter as a, type DevtoolsData as b, type ErrorOccurrence as c, type DevtoolsServerOptions as d };