autotel-devtools 22.0.0 → 23.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.
- package/README.md +183 -28
- package/dist/cli.cjs +80 -13
- package/dist/cli.js +80 -13
- package/dist/compile-JDFHUCo5.d.cts +177 -0
- package/dist/compile-JDFHUCo5.d.ts +177 -0
- package/dist/{error-aggregator-D8VKciLY.d.ts → error-aggregator-B52JI8jL.d.ts} +1 -1
- package/dist/{error-aggregator-DCEKMOm3.d.cts → error-aggregator-DSwUvgFF.d.cts} +1 -1
- package/dist/exporter-BrEcnzoT.d.ts +546 -0
- package/dist/exporter-C4uKgo7l.d.cts +546 -0
- package/dist/fullpage.global.js +39 -0
- package/dist/grpc-CSWjMRiB.cjs +82 -0
- package/dist/grpc-CZEDUYCM.js +77 -0
- package/dist/http-Cqm_MAtc.cjs +3942 -0
- package/dist/http-Dbd9TIYU.js +3776 -0
- package/dist/index.cjs +25 -7
- package/dist/index.d.cts +30 -3
- package/dist/index.d.ts +30 -3
- package/dist/index.js +25 -7
- package/dist/{listen-DBfsfcdd.js → listen-D-lLgfro.js} +5 -2
- package/dist/{listen-CEJ3nYJf.cjs → listen-l09RRHht.cjs} +5 -2
- package/dist/parse-BRlosZft.cjs +642 -0
- package/dist/parse-D_RmPPQs.js +612 -0
- package/dist/query/index.cjs +8 -0
- package/dist/query/index.d.cts +16 -0
- package/dist/query/index.d.ts +16 -0
- package/dist/query/index.js +3 -0
- package/dist/server/exporter.d.cts +1 -1
- package/dist/server/exporter.d.ts +1 -1
- package/dist/server/index.cjs +6 -2
- package/dist/server/index.d.cts +19 -6
- package/dist/server/index.d.ts +18 -5
- package/dist/server/index.js +3 -2
- package/dist/types-B0tjwFqj.d.cts +107 -0
- package/dist/types-DM8y4A9Z.d.ts +107 -0
- package/dist/widget.global.js +15 -24
- package/dist/wire/index.cjs +7 -0
- package/dist/wire/index.d.cts +26 -0
- package/dist/wire/index.d.ts +26 -0
- package/dist/wire/index.js +3 -0
- package/dist/wire-2Rmfg6IT.js +51 -0
- package/dist/wire-CHU1PkMo.cjs +75 -0
- package/package.json +21 -5
- package/dist/exporter-Dt4kx128.d.cts +0 -207
- package/dist/exporter-Due9Rd4s.d.ts +0 -207
- package/dist/http-CNZMrnzv.js +0 -1453
- package/dist/http-CXSzX4ee.cjs +0 -1607
package/dist/server/index.d.cts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../types-DHDvZnnn.cjs";
|
|
2
|
+
import { a as SpanData, i as LogData, n as ErrorGroup, o as TraceData, r as ErrorOccurrence, t as DevtoolsData } from "../types-B0tjwFqj.cjs";
|
|
3
|
+
import { a as DevtoolsStoreOptions, c as QueryLogsArgs, d as QueryTracesArgs, f as QueryTracesResult, i as DevtoolsStore, l as QueryLogsResult, m as TimeWindow, n as DevtoolsServer, o as MetricCatalogEntry, p as SPAN_SCHEMA, r as DevtoolsServerOptions, s as MetricSeries, t as DevtoolsSpanExporter, u as QueryMetricSeriesArgs } from "../exporter-C4uKgo7l.cjs";
|
|
2
4
|
import { DevtoolsLogExporter } from "./log-exporter.cjs";
|
|
3
5
|
import { DevtoolsRemoteExporter, DevtoolsRemoteExporterOptions } from "./remote-exporter.cjs";
|
|
4
|
-
import { t as ErrorAggregator } from "../error-aggregator-
|
|
5
|
-
import { Server } from "node:http";
|
|
6
|
+
import { t as ErrorAggregator } from "../error-aggregator-DSwUvgFF.cjs";
|
|
6
7
|
import { AgentRawEvent, OtelMetricRecord } from "autotel-agents";
|
|
8
|
+
import { Server } from "node:http";
|
|
7
9
|
//#region src/server/http.d.ts
|
|
8
10
|
interface HttpServerOptions {
|
|
9
11
|
port?: number;
|
|
@@ -60,6 +62,19 @@ declare function parseOtlpLogs(payload: unknown): LogData[];
|
|
|
60
62
|
*/
|
|
61
63
|
declare function isProtobufContentType(contentType?: string): boolean;
|
|
62
64
|
//#endregion
|
|
65
|
+
//#region src/server/grpc.d.ts
|
|
66
|
+
interface GrpcReceiver {
|
|
67
|
+
port: number;
|
|
68
|
+
address: string;
|
|
69
|
+
close: () => Promise<void>;
|
|
70
|
+
}
|
|
71
|
+
declare function startOtlpGrpcReceiver(options: {
|
|
72
|
+
devtools: DevtoolsServer;
|
|
73
|
+
host?: string;
|
|
74
|
+
port?: number;
|
|
75
|
+
maxPortAttempts?: number;
|
|
76
|
+
}): Promise<GrpcReceiver>;
|
|
77
|
+
//#endregion
|
|
63
78
|
//#region src/server/identity.d.ts
|
|
64
79
|
/** Value of the `x-autotel-devtools` response header and the /healthz `service` field. */
|
|
65
80
|
declare const DEVTOOLS_IDENTITY = "autotel-devtools";
|
|
@@ -89,13 +104,11 @@ declare function decodeOtlpMetricsRequest(body: Uint8Array): Record<string, unkn
|
|
|
89
104
|
interface TelemetryLimits {
|
|
90
105
|
maxTraceCount: number;
|
|
91
106
|
maxLogCount: number;
|
|
92
|
-
maxMetricCount: number;
|
|
93
107
|
}
|
|
94
108
|
interface ResolveTelemetryLimitsArgs {
|
|
95
109
|
maxHistory?: number;
|
|
96
110
|
maxTraceCount?: number;
|
|
97
111
|
maxLogCount?: number;
|
|
98
|
-
maxMetricCount?: number;
|
|
99
112
|
env?: NodeJS.ProcessEnv;
|
|
100
113
|
}
|
|
101
114
|
declare function resolveTelemetryLimits(args?: ResolveTelemetryLimitsArgs): TelemetryLimits;
|
|
@@ -103,4 +116,4 @@ declare function appendWithLimit<T>(items: T[], item: T, limit: number): T[];
|
|
|
103
116
|
declare function appendManyWithLimit<T>(items: T[], incoming: T[], limit: number): T[];
|
|
104
117
|
declare function applyTelemetryLimits(data: DevtoolsData, limits: TelemetryLimits): DevtoolsData;
|
|
105
118
|
//#endregion
|
|
106
|
-
export { DEVTOOLS_IDENTITY, type DevtoolsData, DevtoolsLogExporter, DevtoolsRemoteExporter, type DevtoolsRemoteExporterOptions, type DevtoolsRoutesOptions, DevtoolsServer, type DevtoolsServerOptions, DevtoolsSpanExporter, ErrorAggregator, type ErrorGroup, type ErrorOccurrence, type HttpServerOptions, type LogData, type
|
|
119
|
+
export { DEVTOOLS_IDENTITY, type DevtoolsData, DevtoolsLogExporter, DevtoolsRemoteExporter, type DevtoolsRemoteExporterOptions, type DevtoolsRoutesOptions, DevtoolsServer, type DevtoolsServerOptions, DevtoolsSpanExporter, DevtoolsStore, type DevtoolsStoreOptions, ErrorAggregator, type ErrorGroup, type ErrorOccurrence, type HttpServerOptions, type LogData, type MetricCatalogEntry, type MetricSeries, type PortHolder, type QueryLogsArgs, type QueryLogsResult, type QueryMetricSeriesArgs, type QueryTracesArgs, type QueryTracesResult, SPAN_SCHEMA, type SpanData, type TelemetryLimits, type TimeWindow, type TraceData, allowSensitiveRequest, appendManyWithLimit, appendWithLimit, applyTelemetryLimits, attachDevtoolsRoutes, createDevtoolsHttpServer, decodeOtlpLogsRequest, decodeOtlpMetricsRequest, decodeOtlpTraceRequest, hostHeaderIsLoopback, isLoopbackHostname, isProtobufContentType, originIsLoopback, parseOtlpLogs, parseOtlpTraces, probePortHolder, resolveTelemetryLimits, startOtlpGrpcReceiver };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../types-DHDvZnnn.js";
|
|
2
|
+
import { a as SpanData, i as LogData, n as ErrorGroup, o as TraceData, r as ErrorOccurrence, t as DevtoolsData } from "../types-DM8y4A9Z.js";
|
|
3
|
+
import { a as DevtoolsStoreOptions, c as QueryLogsArgs, d as QueryTracesArgs, f as QueryTracesResult, i as DevtoolsStore, l as QueryLogsResult, m as TimeWindow, n as DevtoolsServer, o as MetricCatalogEntry, p as SPAN_SCHEMA, r as DevtoolsServerOptions, s as MetricSeries, t as DevtoolsSpanExporter, u as QueryMetricSeriesArgs } from "../exporter-BrEcnzoT.js";
|
|
2
4
|
import { DevtoolsLogExporter } from "./log-exporter.js";
|
|
3
5
|
import { DevtoolsRemoteExporter, DevtoolsRemoteExporterOptions } from "./remote-exporter.js";
|
|
4
|
-
import { t as ErrorAggregator } from "../error-aggregator-
|
|
6
|
+
import { t as ErrorAggregator } from "../error-aggregator-B52JI8jL.js";
|
|
5
7
|
import { Server } from "node:http";
|
|
6
8
|
import { AgentRawEvent, OtelMetricRecord } from "autotel-agents";
|
|
7
9
|
//#region src/server/http.d.ts
|
|
@@ -60,6 +62,19 @@ declare function parseOtlpLogs(payload: unknown): LogData[];
|
|
|
60
62
|
*/
|
|
61
63
|
declare function isProtobufContentType(contentType?: string): boolean;
|
|
62
64
|
//#endregion
|
|
65
|
+
//#region src/server/grpc.d.ts
|
|
66
|
+
interface GrpcReceiver {
|
|
67
|
+
port: number;
|
|
68
|
+
address: string;
|
|
69
|
+
close: () => Promise<void>;
|
|
70
|
+
}
|
|
71
|
+
declare function startOtlpGrpcReceiver(options: {
|
|
72
|
+
devtools: DevtoolsServer;
|
|
73
|
+
host?: string;
|
|
74
|
+
port?: number;
|
|
75
|
+
maxPortAttempts?: number;
|
|
76
|
+
}): Promise<GrpcReceiver>;
|
|
77
|
+
//#endregion
|
|
63
78
|
//#region src/server/identity.d.ts
|
|
64
79
|
/** Value of the `x-autotel-devtools` response header and the /healthz `service` field. */
|
|
65
80
|
declare const DEVTOOLS_IDENTITY = "autotel-devtools";
|
|
@@ -89,13 +104,11 @@ declare function decodeOtlpMetricsRequest(body: Uint8Array): Record<string, unkn
|
|
|
89
104
|
interface TelemetryLimits {
|
|
90
105
|
maxTraceCount: number;
|
|
91
106
|
maxLogCount: number;
|
|
92
|
-
maxMetricCount: number;
|
|
93
107
|
}
|
|
94
108
|
interface ResolveTelemetryLimitsArgs {
|
|
95
109
|
maxHistory?: number;
|
|
96
110
|
maxTraceCount?: number;
|
|
97
111
|
maxLogCount?: number;
|
|
98
|
-
maxMetricCount?: number;
|
|
99
112
|
env?: NodeJS.ProcessEnv;
|
|
100
113
|
}
|
|
101
114
|
declare function resolveTelemetryLimits(args?: ResolveTelemetryLimitsArgs): TelemetryLimits;
|
|
@@ -103,4 +116,4 @@ declare function appendWithLimit<T>(items: T[], item: T, limit: number): T[];
|
|
|
103
116
|
declare function appendManyWithLimit<T>(items: T[], incoming: T[], limit: number): T[];
|
|
104
117
|
declare function applyTelemetryLimits(data: DevtoolsData, limits: TelemetryLimits): DevtoolsData;
|
|
105
118
|
//#endregion
|
|
106
|
-
export { DEVTOOLS_IDENTITY, type DevtoolsData, DevtoolsLogExporter, DevtoolsRemoteExporter, type DevtoolsRemoteExporterOptions, type DevtoolsRoutesOptions, DevtoolsServer, type DevtoolsServerOptions, DevtoolsSpanExporter, ErrorAggregator, type ErrorGroup, type ErrorOccurrence, type HttpServerOptions, type LogData, type
|
|
119
|
+
export { DEVTOOLS_IDENTITY, type DevtoolsData, DevtoolsLogExporter, DevtoolsRemoteExporter, type DevtoolsRemoteExporterOptions, type DevtoolsRoutesOptions, DevtoolsServer, type DevtoolsServerOptions, DevtoolsSpanExporter, DevtoolsStore, type DevtoolsStoreOptions, ErrorAggregator, type ErrorGroup, type ErrorOccurrence, type HttpServerOptions, type LogData, type MetricCatalogEntry, type MetricSeries, type PortHolder, type QueryLogsArgs, type QueryLogsResult, type QueryMetricSeriesArgs, type QueryTracesArgs, type QueryTracesResult, SPAN_SCHEMA, type SpanData, type TelemetryLimits, type TimeWindow, type TraceData, allowSensitiveRequest, appendManyWithLimit, appendWithLimit, applyTelemetryLimits, attachDevtoolsRoutes, createDevtoolsHttpServer, decodeOtlpLogsRequest, decodeOtlpMetricsRequest, decodeOtlpTraceRequest, hostHeaderIsLoopback, isLoopbackHostname, isProtobufContentType, originIsLoopback, parseOtlpLogs, parseOtlpTraces, probePortHolder, resolveTelemetryLimits, startOtlpGrpcReceiver };
|
package/dist/server/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { C as ErrorAggregator, S as resolveTelemetryLimits, _ as isLoopbackHostname, a as probePortHolder, b as appendWithLimit, c as decodeOtlpTraceRequest, d as parseOtlpLogs, f as parseOtlpTraces, g as hostHeaderIsLoopback, h as allowSensitiveRequest, i as DEVTOOLS_IDENTITY, l as DevtoolsServer, m as SPAN_SCHEMA, n as createDevtoolsHttpServer, o as decodeOtlpLogsRequest, p as DevtoolsStore, s as decodeOtlpMetricsRequest, t as attachDevtoolsRoutes, u as isProtobufContentType, v as originIsLoopback, x as applyTelemetryLimits, y as appendManyWithLimit } from "../http-Dbd9TIYU.js";
|
|
2
2
|
import { DevtoolsSpanExporter } from "./exporter.js";
|
|
3
3
|
import { DevtoolsLogExporter } from "./log-exporter.js";
|
|
4
4
|
import { DevtoolsRemoteExporter } from "./remote-exporter.js";
|
|
5
|
+
import { t as startOtlpGrpcReceiver } from "../grpc-CZEDUYCM.js";
|
|
5
6
|
|
|
6
|
-
export { DEVTOOLS_IDENTITY, DevtoolsLogExporter, DevtoolsRemoteExporter, DevtoolsServer, DevtoolsSpanExporter, ErrorAggregator, allowSensitiveRequest, appendManyWithLimit, appendWithLimit, applyTelemetryLimits, attachDevtoolsRoutes, createDevtoolsHttpServer, decodeOtlpLogsRequest, decodeOtlpMetricsRequest, decodeOtlpTraceRequest, hostHeaderIsLoopback, isLoopbackHostname, isProtobufContentType, originIsLoopback, parseOtlpLogs, parseOtlpTraces, probePortHolder, resolveTelemetryLimits };
|
|
7
|
+
export { DEVTOOLS_IDENTITY, DevtoolsLogExporter, DevtoolsRemoteExporter, DevtoolsServer, DevtoolsSpanExporter, DevtoolsStore, ErrorAggregator, SPAN_SCHEMA, allowSensitiveRequest, appendManyWithLimit, appendWithLimit, applyTelemetryLimits, attachDevtoolsRoutes, createDevtoolsHttpServer, decodeOtlpLogsRequest, decodeOtlpMetricsRequest, decodeOtlpTraceRequest, hostHeaderIsLoopback, isLoopbackHostname, isProtobufContentType, originIsLoopback, parseOtlpLogs, parseOtlpTraces, probePortHolder, resolveTelemetryLimits, startOtlpGrpcReceiver };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { n as SpanAttributes } from "./types-DHDvZnnn.cjs";
|
|
2
|
+
import { AgentSession } from "autotel-agents";
|
|
3
|
+
//#region src/server/types.d.ts
|
|
4
|
+
interface SpanData {
|
|
5
|
+
traceId: string;
|
|
6
|
+
spanId: string;
|
|
7
|
+
parentSpanId?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
kind: 'INTERNAL' | 'SERVER' | 'CLIENT' | 'PRODUCER' | 'CONSUMER';
|
|
10
|
+
startTime: number;
|
|
11
|
+
endTime: number;
|
|
12
|
+
duration: number;
|
|
13
|
+
attributes: SpanAttributes;
|
|
14
|
+
status: {
|
|
15
|
+
code: 'OK' | 'ERROR' | 'UNSET';
|
|
16
|
+
message?: string;
|
|
17
|
+
};
|
|
18
|
+
events?: Array<{
|
|
19
|
+
name: string;
|
|
20
|
+
timestamp: number;
|
|
21
|
+
attributes?: SpanAttributes;
|
|
22
|
+
}>;
|
|
23
|
+
links?: Array<{
|
|
24
|
+
traceId: string;
|
|
25
|
+
spanId: string;
|
|
26
|
+
attributes?: SpanAttributes;
|
|
27
|
+
}>;
|
|
28
|
+
scope?: {
|
|
29
|
+
name?: string;
|
|
30
|
+
version?: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
interface TraceData {
|
|
34
|
+
traceId: string;
|
|
35
|
+
correlationId: string;
|
|
36
|
+
rootSpan: SpanData;
|
|
37
|
+
spans: SpanData[];
|
|
38
|
+
startTime: number;
|
|
39
|
+
endTime: number;
|
|
40
|
+
duration: number;
|
|
41
|
+
status: 'OK' | 'ERROR' | 'UNSET';
|
|
42
|
+
service: string;
|
|
43
|
+
/**
|
|
44
|
+
* True when no span in this trace is a true root: every span received has a
|
|
45
|
+
* parent that did not arrive. The trace is a fragment, normally because
|
|
46
|
+
* sampling kept only part of it or because the rest is still in flight.
|
|
47
|
+
* `rootSpan` is then the earliest span whose parent is absent rather than the
|
|
48
|
+
* real root, and the duration covers only the part present. Recomputed as
|
|
49
|
+
* spans merge, so it clears once the real root arrives.
|
|
50
|
+
*/
|
|
51
|
+
partial?: boolean;
|
|
52
|
+
}
|
|
53
|
+
interface LogData {
|
|
54
|
+
id: string;
|
|
55
|
+
traceId?: string;
|
|
56
|
+
spanId?: string;
|
|
57
|
+
resourceName?: string;
|
|
58
|
+
severityText?: string;
|
|
59
|
+
severityNumber?: number;
|
|
60
|
+
body: string | Record<string, unknown>;
|
|
61
|
+
timestamp: number;
|
|
62
|
+
attributes?: SpanAttributes;
|
|
63
|
+
resource?: Record<string, unknown>;
|
|
64
|
+
}
|
|
65
|
+
interface ErrorGroup {
|
|
66
|
+
fingerprint: string;
|
|
67
|
+
type: string;
|
|
68
|
+
message: string;
|
|
69
|
+
stackTrace?: string;
|
|
70
|
+
count: number;
|
|
71
|
+
firstSeen: number;
|
|
72
|
+
lastSeen: number;
|
|
73
|
+
affectedTraces: string[];
|
|
74
|
+
affectedSpans: string[];
|
|
75
|
+
service?: string;
|
|
76
|
+
attributes?: SpanAttributes;
|
|
77
|
+
}
|
|
78
|
+
interface ErrorOccurrence {
|
|
79
|
+
traceId: string;
|
|
80
|
+
spanId: string;
|
|
81
|
+
spanName: string;
|
|
82
|
+
service: string;
|
|
83
|
+
timestamp: number;
|
|
84
|
+
error: {
|
|
85
|
+
type: string;
|
|
86
|
+
message: string;
|
|
87
|
+
stackTrace?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Grouping key the emitting SDK already decided on (`exception.fingerprint`,
|
|
90
|
+
* written by autotel's `exceptionFingerprint()` enricher). When present the
|
|
91
|
+
* aggregator groups by it instead of re-deriving one from the stack string,
|
|
92
|
+
* so this tab agrees with every other backend receiving the same spans.
|
|
93
|
+
*/
|
|
94
|
+
fingerprint?: string;
|
|
95
|
+
};
|
|
96
|
+
attributes?: SpanAttributes;
|
|
97
|
+
}
|
|
98
|
+
interface DevtoolsData {
|
|
99
|
+
traces: TraceData[];
|
|
100
|
+
logs: LogData[];
|
|
101
|
+
errors: ErrorGroup[];
|
|
102
|
+
/** Full-state on every broadcast (client replaces, like `errors`). Coding-agent
|
|
103
|
+
* sessions reconstructed from agent metrics + log events. */
|
|
104
|
+
agents?: AgentSession[];
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { SpanData as a, LogData as i, ErrorGroup as n, TraceData as o, ErrorOccurrence as r, DevtoolsData as t };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { n as SpanAttributes } from "./types-DHDvZnnn.js";
|
|
2
|
+
import { AgentSession } from "autotel-agents";
|
|
3
|
+
//#region src/server/types.d.ts
|
|
4
|
+
interface SpanData {
|
|
5
|
+
traceId: string;
|
|
6
|
+
spanId: string;
|
|
7
|
+
parentSpanId?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
kind: 'INTERNAL' | 'SERVER' | 'CLIENT' | 'PRODUCER' | 'CONSUMER';
|
|
10
|
+
startTime: number;
|
|
11
|
+
endTime: number;
|
|
12
|
+
duration: number;
|
|
13
|
+
attributes: SpanAttributes;
|
|
14
|
+
status: {
|
|
15
|
+
code: 'OK' | 'ERROR' | 'UNSET';
|
|
16
|
+
message?: string;
|
|
17
|
+
};
|
|
18
|
+
events?: Array<{
|
|
19
|
+
name: string;
|
|
20
|
+
timestamp: number;
|
|
21
|
+
attributes?: SpanAttributes;
|
|
22
|
+
}>;
|
|
23
|
+
links?: Array<{
|
|
24
|
+
traceId: string;
|
|
25
|
+
spanId: string;
|
|
26
|
+
attributes?: SpanAttributes;
|
|
27
|
+
}>;
|
|
28
|
+
scope?: {
|
|
29
|
+
name?: string;
|
|
30
|
+
version?: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
interface TraceData {
|
|
34
|
+
traceId: string;
|
|
35
|
+
correlationId: string;
|
|
36
|
+
rootSpan: SpanData;
|
|
37
|
+
spans: SpanData[];
|
|
38
|
+
startTime: number;
|
|
39
|
+
endTime: number;
|
|
40
|
+
duration: number;
|
|
41
|
+
status: 'OK' | 'ERROR' | 'UNSET';
|
|
42
|
+
service: string;
|
|
43
|
+
/**
|
|
44
|
+
* True when no span in this trace is a true root: every span received has a
|
|
45
|
+
* parent that did not arrive. The trace is a fragment, normally because
|
|
46
|
+
* sampling kept only part of it or because the rest is still in flight.
|
|
47
|
+
* `rootSpan` is then the earliest span whose parent is absent rather than the
|
|
48
|
+
* real root, and the duration covers only the part present. Recomputed as
|
|
49
|
+
* spans merge, so it clears once the real root arrives.
|
|
50
|
+
*/
|
|
51
|
+
partial?: boolean;
|
|
52
|
+
}
|
|
53
|
+
interface LogData {
|
|
54
|
+
id: string;
|
|
55
|
+
traceId?: string;
|
|
56
|
+
spanId?: string;
|
|
57
|
+
resourceName?: string;
|
|
58
|
+
severityText?: string;
|
|
59
|
+
severityNumber?: number;
|
|
60
|
+
body: string | Record<string, unknown>;
|
|
61
|
+
timestamp: number;
|
|
62
|
+
attributes?: SpanAttributes;
|
|
63
|
+
resource?: Record<string, unknown>;
|
|
64
|
+
}
|
|
65
|
+
interface ErrorGroup {
|
|
66
|
+
fingerprint: string;
|
|
67
|
+
type: string;
|
|
68
|
+
message: string;
|
|
69
|
+
stackTrace?: string;
|
|
70
|
+
count: number;
|
|
71
|
+
firstSeen: number;
|
|
72
|
+
lastSeen: number;
|
|
73
|
+
affectedTraces: string[];
|
|
74
|
+
affectedSpans: string[];
|
|
75
|
+
service?: string;
|
|
76
|
+
attributes?: SpanAttributes;
|
|
77
|
+
}
|
|
78
|
+
interface ErrorOccurrence {
|
|
79
|
+
traceId: string;
|
|
80
|
+
spanId: string;
|
|
81
|
+
spanName: string;
|
|
82
|
+
service: string;
|
|
83
|
+
timestamp: number;
|
|
84
|
+
error: {
|
|
85
|
+
type: string;
|
|
86
|
+
message: string;
|
|
87
|
+
stackTrace?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Grouping key the emitting SDK already decided on (`exception.fingerprint`,
|
|
90
|
+
* written by autotel's `exceptionFingerprint()` enricher). When present the
|
|
91
|
+
* aggregator groups by it instead of re-deriving one from the stack string,
|
|
92
|
+
* so this tab agrees with every other backend receiving the same spans.
|
|
93
|
+
*/
|
|
94
|
+
fingerprint?: string;
|
|
95
|
+
};
|
|
96
|
+
attributes?: SpanAttributes;
|
|
97
|
+
}
|
|
98
|
+
interface DevtoolsData {
|
|
99
|
+
traces: TraceData[];
|
|
100
|
+
logs: LogData[];
|
|
101
|
+
errors: ErrorGroup[];
|
|
102
|
+
/** Full-state on every broadcast (client replaces, like `errors`). Coding-agent
|
|
103
|
+
* sessions reconstructed from agent metrics + log events. */
|
|
104
|
+
agents?: AgentSession[];
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { SpanData as a, LogData as i, ErrorGroup as n, TraceData as o, ErrorOccurrence as r, DevtoolsData as t };
|