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/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_http = require('./http-
|
|
3
|
-
const require_listen = require('./listen-
|
|
2
|
+
const require_http = require('./http-Cqm_MAtc.cjs');
|
|
3
|
+
const require_listen = require('./listen-l09RRHht.cjs');
|
|
4
4
|
const require_server_exporter = require('./server/exporter.cjs');
|
|
5
5
|
const require_server_log_exporter = require('./server/log-exporter.cjs');
|
|
6
6
|
const require_server_remote_exporter = require('./server/remote-exporter.cjs');
|
|
@@ -19,7 +19,12 @@ function createDevtools(options = {}) {
|
|
|
19
19
|
maxHistory: options.maxHistory,
|
|
20
20
|
maxTraceCount: options.maxTraceCount,
|
|
21
21
|
maxLogCount: options.maxLogCount,
|
|
22
|
-
maxMetricCount: options.maxMetricCount
|
|
22
|
+
maxMetricCount: options.maxMetricCount,
|
|
23
|
+
dbPath: options.dbPath,
|
|
24
|
+
maxTraces: options.maxTraces,
|
|
25
|
+
maxLogs: options.maxLogs,
|
|
26
|
+
maxDbBytes: options.maxDbBytes,
|
|
27
|
+
retentionIntervalMs: options.retentionIntervalMs
|
|
23
28
|
});
|
|
24
29
|
const sourceRoot = require_http.resolveSourceRoot(options.sourceRoot === false ? "false" : options.sourceRoot ?? process.env.AUTOTEL_DEVTOOLS_SOURCE_ROOT, process.cwd(), loopbackOnly);
|
|
25
30
|
require_http.attachDevtoolsRoutes(httpServer, wsServer, {
|
|
@@ -30,10 +35,13 @@ function createDevtools(options = {}) {
|
|
|
30
35
|
primary: httpServer,
|
|
31
36
|
port,
|
|
32
37
|
host,
|
|
33
|
-
attachSecondary: (s) =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
attachSecondary: (s) => {
|
|
39
|
+
require_http.attachDevtoolsRoutes(s, wsServer, {
|
|
40
|
+
loopbackOnly,
|
|
41
|
+
sourceRoot
|
|
42
|
+
});
|
|
43
|
+
wsServer.attachWebSocket(s);
|
|
44
|
+
}
|
|
37
45
|
});
|
|
38
46
|
if (options.verbose) listeners.ready.then(({ warnings }) => {
|
|
39
47
|
for (const w of warnings) console.warn(`[autotel-devtools] ${w}`);
|
|
@@ -43,6 +51,16 @@ function createDevtools(options = {}) {
|
|
|
43
51
|
httpServer,
|
|
44
52
|
exporter: new require_server_exporter.DevtoolsSpanExporter(wsServer),
|
|
45
53
|
port,
|
|
54
|
+
/**
|
|
55
|
+
* Resolves once both loopback listeners are up, with the port actually
|
|
56
|
+
* bound.
|
|
57
|
+
*
|
|
58
|
+
* `port` above is what was *asked for*, which is not the same thing: pass
|
|
59
|
+
* `port: 0` and it stays 0, and a busy port falls forward to the next free
|
|
60
|
+
* one. An embedder that wants to print a URL or point an exporter at this
|
|
61
|
+
* receiver needs the resolved value, and until now had no way to get it.
|
|
62
|
+
*/
|
|
63
|
+
ready: listeners.ready,
|
|
46
64
|
close: async () => {
|
|
47
65
|
await wsServer.close();
|
|
48
66
|
await listeners.closeSibling();
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { n as SpanAttributes, t as AttributeValue } from "./types-DHDvZnnn.cjs";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as SpanData, i as LogData, n as ErrorGroup, o as TraceData, t as DevtoolsData } from "./types-B0tjwFqj.cjs";
|
|
3
|
+
import { n as DevtoolsServer, t as DevtoolsSpanExporter } from "./exporter-C4uKgo7l.cjs";
|
|
3
4
|
import { DevtoolsLogExporter } from "./server/log-exporter.cjs";
|
|
4
5
|
import { DevtoolsRemoteExporter } from "./server/remote-exporter.cjs";
|
|
5
|
-
import { t as ErrorAggregator } from "./error-aggregator-
|
|
6
|
+
import { t as ErrorAggregator } from "./error-aggregator-DSwUvgFF.cjs";
|
|
6
7
|
import { Server } from "node:http";
|
|
7
8
|
//#region src/index.d.ts
|
|
8
9
|
interface CreateDevtoolsOptions {
|
|
@@ -21,14 +22,40 @@ interface CreateDevtoolsOptions {
|
|
|
21
22
|
* otherwise. `false` disables it. See `resolveSourceRoot`.
|
|
22
23
|
*/
|
|
23
24
|
sourceRoot?: string | false;
|
|
25
|
+
/**
|
|
26
|
+
* Path to the sqlite file backing the store.
|
|
27
|
+
*
|
|
28
|
+
* Omit for in-memory, which is the default: an embedder gets querying and
|
|
29
|
+
* paging without this call suddenly writing a database file it did not ask
|
|
30
|
+
* for. Set it to keep telemetry across restarts.
|
|
31
|
+
*/
|
|
32
|
+
dbPath?: string;
|
|
33
|
+
/** Maximum traces retained in the store before the oldest are pruned. */
|
|
34
|
+
maxTraces?: number;
|
|
35
|
+
/** Maximum logs retained in the store before the oldest are pruned. */
|
|
36
|
+
maxLogs?: number;
|
|
37
|
+
/** Maximum logical sqlite size before oldest telemetry is pruned. */
|
|
38
|
+
maxDbBytes?: number;
|
|
39
|
+
/** How often to prune the store past its caps, in ms. `0` disables it. */
|
|
40
|
+
retentionIntervalMs?: number;
|
|
24
41
|
}
|
|
25
42
|
interface DevtoolsInstance {
|
|
26
43
|
server: DevtoolsServer;
|
|
27
44
|
httpServer: Server;
|
|
28
45
|
exporter: DevtoolsSpanExporter;
|
|
46
|
+
/** The port that was *requested*. See `ready` for the one actually bound. */
|
|
29
47
|
port: number;
|
|
48
|
+
/**
|
|
49
|
+
* Resolves once both loopback listeners are up, carrying the bound port,
|
|
50
|
+
* every address bound, and any warnings raised while binding.
|
|
51
|
+
*/
|
|
52
|
+
ready: Promise<{
|
|
53
|
+
addresses: string[];
|
|
54
|
+
port: number;
|
|
55
|
+
warnings: string[];
|
|
56
|
+
}>;
|
|
30
57
|
close: () => Promise<void>;
|
|
31
58
|
}
|
|
32
59
|
declare function createDevtools(options?: CreateDevtoolsOptions): DevtoolsInstance;
|
|
33
60
|
//#endregion
|
|
34
|
-
export { type AttributeValue, CreateDevtoolsOptions, type DevtoolsData, DevtoolsInstance, DevtoolsLogExporter, DevtoolsRemoteExporter, DevtoolsServer, DevtoolsSpanExporter, ErrorAggregator, type ErrorGroup, type LogData, type
|
|
61
|
+
export { type AttributeValue, CreateDevtoolsOptions, type DevtoolsData, DevtoolsInstance, DevtoolsLogExporter, DevtoolsRemoteExporter, DevtoolsServer, DevtoolsSpanExporter, ErrorAggregator, type ErrorGroup, type LogData, type SpanAttributes, type SpanData, type TraceData, createDevtools };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { n as SpanAttributes, t as AttributeValue } from "./types-DHDvZnnn.js";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as SpanData, i as LogData, n as ErrorGroup, o as TraceData, t as DevtoolsData } from "./types-DM8y4A9Z.js";
|
|
3
|
+
import { n as DevtoolsServer, t as DevtoolsSpanExporter } from "./exporter-BrEcnzoT.js";
|
|
3
4
|
import { DevtoolsLogExporter } from "./server/log-exporter.js";
|
|
4
5
|
import { DevtoolsRemoteExporter } from "./server/remote-exporter.js";
|
|
5
|
-
import { t as ErrorAggregator } from "./error-aggregator-
|
|
6
|
+
import { t as ErrorAggregator } from "./error-aggregator-B52JI8jL.js";
|
|
6
7
|
import { Server } from "node:http";
|
|
7
8
|
//#region src/index.d.ts
|
|
8
9
|
interface CreateDevtoolsOptions {
|
|
@@ -21,14 +22,40 @@ interface CreateDevtoolsOptions {
|
|
|
21
22
|
* otherwise. `false` disables it. See `resolveSourceRoot`.
|
|
22
23
|
*/
|
|
23
24
|
sourceRoot?: string | false;
|
|
25
|
+
/**
|
|
26
|
+
* Path to the sqlite file backing the store.
|
|
27
|
+
*
|
|
28
|
+
* Omit for in-memory, which is the default: an embedder gets querying and
|
|
29
|
+
* paging without this call suddenly writing a database file it did not ask
|
|
30
|
+
* for. Set it to keep telemetry across restarts.
|
|
31
|
+
*/
|
|
32
|
+
dbPath?: string;
|
|
33
|
+
/** Maximum traces retained in the store before the oldest are pruned. */
|
|
34
|
+
maxTraces?: number;
|
|
35
|
+
/** Maximum logs retained in the store before the oldest are pruned. */
|
|
36
|
+
maxLogs?: number;
|
|
37
|
+
/** Maximum logical sqlite size before oldest telemetry is pruned. */
|
|
38
|
+
maxDbBytes?: number;
|
|
39
|
+
/** How often to prune the store past its caps, in ms. `0` disables it. */
|
|
40
|
+
retentionIntervalMs?: number;
|
|
24
41
|
}
|
|
25
42
|
interface DevtoolsInstance {
|
|
26
43
|
server: DevtoolsServer;
|
|
27
44
|
httpServer: Server;
|
|
28
45
|
exporter: DevtoolsSpanExporter;
|
|
46
|
+
/** The port that was *requested*. See `ready` for the one actually bound. */
|
|
29
47
|
port: number;
|
|
48
|
+
/**
|
|
49
|
+
* Resolves once both loopback listeners are up, carrying the bound port,
|
|
50
|
+
* every address bound, and any warnings raised while binding.
|
|
51
|
+
*/
|
|
52
|
+
ready: Promise<{
|
|
53
|
+
addresses: string[];
|
|
54
|
+
port: number;
|
|
55
|
+
warnings: string[];
|
|
56
|
+
}>;
|
|
30
57
|
close: () => Promise<void>;
|
|
31
58
|
}
|
|
32
59
|
declare function createDevtools(options?: CreateDevtoolsOptions): DevtoolsInstance;
|
|
33
60
|
//#endregion
|
|
34
|
-
export { type AttributeValue, CreateDevtoolsOptions, type DevtoolsData, DevtoolsInstance, DevtoolsLogExporter, DevtoolsRemoteExporter, DevtoolsServer, DevtoolsSpanExporter, ErrorAggregator, type ErrorGroup, type LogData, type
|
|
61
|
+
export { type AttributeValue, CreateDevtoolsOptions, type DevtoolsData, DevtoolsInstance, DevtoolsLogExporter, DevtoolsRemoteExporter, DevtoolsServer, DevtoolsSpanExporter, ErrorAggregator, type ErrorGroup, type LogData, type SpanAttributes, type SpanData, type TraceData, createDevtools };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as listenLoopbackDualStack } from "./listen-
|
|
1
|
+
import { C as ErrorAggregator, g as hostHeaderIsLoopback, l as DevtoolsServer, r as resolveSourceRoot, t as attachDevtoolsRoutes } from "./http-Dbd9TIYU.js";
|
|
2
|
+
import { t as listenLoopbackDualStack } from "./listen-D-lLgfro.js";
|
|
3
3
|
import { DevtoolsSpanExporter } from "./server/exporter.js";
|
|
4
4
|
import { DevtoolsLogExporter } from "./server/log-exporter.js";
|
|
5
5
|
import { DevtoolsRemoteExporter } from "./server/remote-exporter.js";
|
|
@@ -18,7 +18,12 @@ function createDevtools(options = {}) {
|
|
|
18
18
|
maxHistory: options.maxHistory,
|
|
19
19
|
maxTraceCount: options.maxTraceCount,
|
|
20
20
|
maxLogCount: options.maxLogCount,
|
|
21
|
-
maxMetricCount: options.maxMetricCount
|
|
21
|
+
maxMetricCount: options.maxMetricCount,
|
|
22
|
+
dbPath: options.dbPath,
|
|
23
|
+
maxTraces: options.maxTraces,
|
|
24
|
+
maxLogs: options.maxLogs,
|
|
25
|
+
maxDbBytes: options.maxDbBytes,
|
|
26
|
+
retentionIntervalMs: options.retentionIntervalMs
|
|
22
27
|
});
|
|
23
28
|
const sourceRoot = resolveSourceRoot(options.sourceRoot === false ? "false" : options.sourceRoot ?? process.env.AUTOTEL_DEVTOOLS_SOURCE_ROOT, process.cwd(), loopbackOnly);
|
|
24
29
|
attachDevtoolsRoutes(httpServer, wsServer, {
|
|
@@ -29,10 +34,13 @@ function createDevtools(options = {}) {
|
|
|
29
34
|
primary: httpServer,
|
|
30
35
|
port,
|
|
31
36
|
host,
|
|
32
|
-
attachSecondary: (s) =>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
attachSecondary: (s) => {
|
|
38
|
+
attachDevtoolsRoutes(s, wsServer, {
|
|
39
|
+
loopbackOnly,
|
|
40
|
+
sourceRoot
|
|
41
|
+
});
|
|
42
|
+
wsServer.attachWebSocket(s);
|
|
43
|
+
}
|
|
36
44
|
});
|
|
37
45
|
if (options.verbose) listeners.ready.then(({ warnings }) => {
|
|
38
46
|
for (const w of warnings) console.warn(`[autotel-devtools] ${w}`);
|
|
@@ -42,6 +50,16 @@ function createDevtools(options = {}) {
|
|
|
42
50
|
httpServer,
|
|
43
51
|
exporter: new DevtoolsSpanExporter(wsServer),
|
|
44
52
|
port,
|
|
53
|
+
/**
|
|
54
|
+
* Resolves once both loopback listeners are up, with the port actually
|
|
55
|
+
* bound.
|
|
56
|
+
*
|
|
57
|
+
* `port` above is what was *asked for*, which is not the same thing: pass
|
|
58
|
+
* `port: 0` and it stays 0, and a busy port falls forward to the next free
|
|
59
|
+
* one. An embedder that wants to print a URL or point an exporter at this
|
|
60
|
+
* receiver needs the resolved value, and until now had no way to get it.
|
|
61
|
+
*/
|
|
62
|
+
ready: listeners.ready,
|
|
45
63
|
close: async () => {
|
|
46
64
|
await wsServer.close();
|
|
47
65
|
await listeners.closeSibling();
|
|
@@ -31,8 +31,11 @@ function formatAddress(host, port) {
|
|
|
31
31
|
* is returned in `ready` so callers can print correct URLs and OTLP
|
|
32
32
|
* endpoints. Each fallback produces a warning.
|
|
33
33
|
*
|
|
34
|
-
* The sibling listener serves the same HTTP routes
|
|
35
|
-
*
|
|
34
|
+
* The sibling listener serves the same HTTP routes *and the WebSocket* via
|
|
35
|
+
* `attachSecondary`: a caller that attaches only routes leaves a client on the
|
|
36
|
+
* other IP family able to read telemetry over HTTP while its live tail never
|
|
37
|
+
* connects, which looks like a hung UI rather than a bind problem. If the
|
|
38
|
+
* sibling cannot bind
|
|
36
39
|
* (e.g. no IPv6, or the port is taken on that family), it is reported as a
|
|
37
40
|
* warning rather than a fatal error.
|
|
38
41
|
*/
|
|
@@ -31,8 +31,11 @@ function formatAddress(host, port) {
|
|
|
31
31
|
* is returned in `ready` so callers can print correct URLs and OTLP
|
|
32
32
|
* endpoints. Each fallback produces a warning.
|
|
33
33
|
*
|
|
34
|
-
* The sibling listener serves the same HTTP routes
|
|
35
|
-
*
|
|
34
|
+
* The sibling listener serves the same HTTP routes *and the WebSocket* via
|
|
35
|
+
* `attachSecondary`: a caller that attaches only routes leaves a client on the
|
|
36
|
+
* other IP family able to read telemetry over HTTP while its live tail never
|
|
37
|
+
* connects, which looks like a hung UI rather than a bind problem. If the
|
|
38
|
+
* sibling cannot bind
|
|
36
39
|
* (e.g. no IPv6, or the port is taken on that family), it is reported as a
|
|
37
40
|
* warning rather than a fatal error.
|
|
38
41
|
*/
|