@braidlabs/otel 0.0.0-stage → 0.7.1
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 +118 -2
- package/package.json +42 -3
- package/src/gateway.d.ts +25 -0
- package/src/gateway.js +148 -0
- package/src/gateway.js.map +1 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -0
package/README.md
CHANGED
|
@@ -1,3 +1,119 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @braidlabs/otel
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
OpenTelemetry for Braid. Every fragment fetch the gateway makes becomes a span in the traces you
|
|
4
|
+
already collect, named for its fragment, and the fragment's endpoint receives that span as its
|
|
5
|
+
parent. "The page is slow" becomes "`orders` took 900 ms to answer the pierce", in Honeycomb,
|
|
6
|
+
Datadog, Grafana Tempo or wherever your traces go.
|
|
7
|
+
|
|
8
|
+
This is Phase 1 of the [OpenTelemetry plan](https://github.com/braidjs/braid/blob/main/docs/otel-plan.md): server tracing in the gateway.
|
|
9
|
+
Browser RUM, the console's Insights views and the other integrations follow.
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install @braidlabs/otel @opentelemetry/api
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
Register your tracing SDK first, as you would for any Node service. Then hand the gateway its
|
|
18
|
+
telemetry:
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { createGateway } from '@braidlabs/gateway';
|
|
22
|
+
import { otelGatewayTelemetry } from '@braidlabs/otel';
|
|
23
|
+
|
|
24
|
+
createGateway({
|
|
25
|
+
registry,
|
|
26
|
+
telemetry: otelGatewayTelemetry({ webVitals: true, sampleRate: 0.2 }),
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`otelGatewayTelemetry` accepts every other `telemetry` option, and an `on` you pass still receives
|
|
31
|
+
every event.
|
|
32
|
+
|
|
33
|
+
## What you get
|
|
34
|
+
|
|
35
|
+
- **A CLIENT span per fragment fetch.** Fetches for pierced documents, the fragment namespace and
|
|
36
|
+
fragment documents each get one, named `GET <fragment id>`. Attributes:
|
|
37
|
+
- `braid.fragment.id`;
|
|
38
|
+
- `braid.fetch.phase`, which is `pierce` or `namespace`;
|
|
39
|
+
- `braid.fetch.outcome`, which is `ok`, `error`, `timeout` or `shed`;
|
|
40
|
+
- `http.request.method` and `http.response.status_code`.
|
|
41
|
+
|
|
42
|
+
A timeout, a fetch the circuit breaker refused, a 5xx and a thrown error mark the span as an
|
|
43
|
+
error. Their `error.type` is `timeout`, `braid.circuit_open`, the status code, or the error's
|
|
44
|
+
name. A 4xx is the fragment's answer, not a failed fetch, and is left unmarked. A method HTTP
|
|
45
|
+
doesn't define is recorded as `_OTHER` and names the span `HTTP <fragment id>`.
|
|
46
|
+
- **One trace through the fragment.** The fragment request carries the trace context of its
|
|
47
|
+
own span, written by your registered propagator (W3C `traceparent`, B3, …), and never what the
|
|
48
|
+
browser sent. An instrumented fragment backend joins the same trace.
|
|
49
|
+
- **Coalesced fetches say so.** When identical fragment fetches are in flight at once, the gateway
|
|
50
|
+
makes one and shares its response. Every caller still gets its span, but only the first one's
|
|
51
|
+
trace context reaches the endpoint; the others carry `braid.fetch.coalesced: true`, and have no
|
|
52
|
+
children from the fragment backend.
|
|
53
|
+
- **Breaker transitions and per-fragment web vitals** appear as span events
|
|
54
|
+
(`braid.breaker.transition`, `browser.web_vital`) on the active span, which is the request span
|
|
55
|
+
your HTTP instrumentation opened. Without that instrumentation there is no active span, and they
|
|
56
|
+
go only to `on`. A web vital is on the span of the beacon request that carried it, not the page's
|
|
57
|
+
trace. It is reported by the browser, unauthenticated, so treat its values, fragment id and path
|
|
58
|
+
as user input.
|
|
59
|
+
- **Your SDK, not ours.** Spans go to the globally registered tracer provider, or to
|
|
60
|
+
`tracerProvider` if you pass one. With nothing registered, the API hands out no-op tracers, and
|
|
61
|
+
fragment requests are as they would be without this package. Neither `@braidlabs/core` nor
|
|
62
|
+
`@braidlabs/gateway` depends on OpenTelemetry.
|
|
63
|
+
|
|
64
|
+
## Registering an SDK
|
|
65
|
+
|
|
66
|
+
**OpenTelemetry NodeSDK, exporting OTLP to a collector:**
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { NodeSDK } from '@opentelemetry/sdk-node';
|
|
70
|
+
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
|
|
71
|
+
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
|
|
72
|
+
|
|
73
|
+
new NodeSDK({
|
|
74
|
+
serviceName: 'shell',
|
|
75
|
+
traceExporter: new OTLPTraceExporter({ url: 'http://collector:4318/v1/traces' }),
|
|
76
|
+
instrumentations: [getNodeAutoInstrumentations()],
|
|
77
|
+
}).start();
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Honeycomb:**
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
import { HoneycombSDK } from '@honeycombio/opentelemetry-node';
|
|
84
|
+
|
|
85
|
+
new HoneycombSDK({ serviceName: 'shell' }).start(); // HONEYCOMB_API_KEY from the environment
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Datadog, with `dd-trace`'s OpenTelemetry API support** (initialized before anything else, as
|
|
89
|
+
`dd-trace` must be; for ES modules, also start Node with `--import dd-trace/initialize.mjs`):
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
import tracer from 'dd-trace';
|
|
93
|
+
|
|
94
|
+
tracer.init();
|
|
95
|
+
const provider = new tracer.TracerProvider();
|
|
96
|
+
provider.register();
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
With HTTP auto-instrumentation on, the gateway's fragment spans sit under the request's SERVER
|
|
100
|
+
span. Each fragment fetch runs with Braid's span active. So when outgoing `fetch` (undici) is
|
|
101
|
+
instrumented too, as NodeSDK's auto-instrumentations do, the HTTP client's span nests inside
|
|
102
|
+
Braid's, the one named for the fragment. That instrumentation then writes the request's trace
|
|
103
|
+
context, and Braid writes none of its own, because it appends rather than replaces and two
|
|
104
|
+
`traceparent` headers would leave the backend with neither. With an SDK registered but no HTTP
|
|
105
|
+
instrumentation, there is no request span to join, so each fragment fetch starts a trace of its
|
|
106
|
+
own.
|
|
107
|
+
|
|
108
|
+
A propagator also carries the OpenTelemetry context's baggage, which your HTTP server
|
|
109
|
+
instrumentation fills from the browser's `baggage` header. Fragment fetches run without it, so the
|
|
110
|
+
gateway's `baggage` option stays the only thing deciding what a fragment receives.
|
|
111
|
+
|
|
112
|
+
Websocket upgrades to a fragment get no span yet, and the browser's trace context passes through
|
|
113
|
+
to the fragment's socket as it came.
|
|
114
|
+
|
|
115
|
+
## Baggage
|
|
116
|
+
|
|
117
|
+
Unrelated to whether this package is installed, the gateway no longer copies the browser's
|
|
118
|
+
`baggage` header to fragment endpoints. Allowlist what may pass, and add your own, with the
|
|
119
|
+
gateway's `baggage` option. See [@braidlabs/gateway](https://github.com/braidjs/braid/blob/main/docs/packages/gateway.md#baggage).
|
package/package.json
CHANGED
|
@@ -1,6 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@braidlabs/otel",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.7.1",
|
|
4
|
+
"description": "OpenTelemetry for Braid: every fragment fetch the gateway makes as a span in your existing traces, attributed to its fragment, with trace context propagated to the fragment's endpoint. Brings no SDK of its own — spans go to whatever tracer provider you register (NodeSDK, a Honeycomb distro, dd-trace).",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"braid",
|
|
7
|
+
"micro-frontends",
|
|
8
|
+
"opentelemetry",
|
|
9
|
+
"otel",
|
|
10
|
+
"tracing",
|
|
11
|
+
"observability"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=24"
|
|
16
|
+
},
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "./src/index.js",
|
|
20
|
+
"types": "./src/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./src/index.d.ts",
|
|
24
|
+
"default": "./src/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@braidlabs/gateway": "^0.7.1",
|
|
30
|
+
"@opentelemetry/api": "^1.3.0"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/braidjs/braid.git",
|
|
38
|
+
"directory": "libs/otel"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://github.com/braidjs/braid#readme",
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/braidjs/braid/issues"
|
|
43
|
+
},
|
|
44
|
+
"module": "./src/index.js"
|
|
6
45
|
}
|
package/src/gateway.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type TracerProvider } from '@opentelemetry/api';
|
|
2
|
+
import type { TelemetryOptions } from '@braidlabs/gateway';
|
|
3
|
+
/**
|
|
4
|
+
* OpenTelemetry for the gateway: each fragment fetch becomes a CLIENT span in the current trace,
|
|
5
|
+
* named for its fragment, and the fragment's endpoint is handed that span as its parent.
|
|
6
|
+
*
|
|
7
|
+
* It brings no SDK. Spans go to whatever tracer provider the process registered — NodeSDK with an
|
|
8
|
+
* OTLP exporter, a Honeycomb distribution, `dd-trace`'s provider — so they land in the traces the
|
|
9
|
+
* deployment already has, under the request span its HTTP instrumentation already opened. With
|
|
10
|
+
* nothing registered, the API hands out no-op tracers and this costs next to nothing.
|
|
11
|
+
*/
|
|
12
|
+
export interface OtelGatewayTelemetryOptions extends Omit<TelemetryOptions, 'onFragmentFetch'> {
|
|
13
|
+
/** A tracer provider to use instead of the globally registered one. */
|
|
14
|
+
tracerProvider?: TracerProvider;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Gateway telemetry that records fragment fetches as OpenTelemetry spans.
|
|
18
|
+
*
|
|
19
|
+
* ```ts
|
|
20
|
+
* createGateway({ registry, telemetry: otelGatewayTelemetry({ webVitals: true }) });
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* Accepts every other `telemetry` option, and passes events to an `on` given here too.
|
|
24
|
+
*/
|
|
25
|
+
export declare function otelGatewayTelemetry(options?: OtelGatewayTelemetryOptions): TelemetryOptions;
|
package/src/gateway.js
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { context, propagation, SpanKind, SpanStatusCode, trace, } from '@opentelemetry/api';
|
|
2
|
+
const TRACER_NAME = '@braidlabs/otel';
|
|
3
|
+
/** Methods HTTP semantic conventions name; any other is `_OTHER`, so span names stay bounded. */
|
|
4
|
+
const HTTP_METHODS = new Set(['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH']);
|
|
5
|
+
/** W3C `traceparent` for a span context. */
|
|
6
|
+
function traceparent(spanContext) {
|
|
7
|
+
return `00-${spanContext.traceId}-${spanContext.spanId}-${(spanContext.traceFlags & 0xff).toString(16).padStart(2, '0')}`;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Whether an HTTP-client instrumentation hooks the gateway's `fetch` — OpenTelemetry's undici
|
|
11
|
+
* instrumentation, which NodeSDK's auto-instrumentations install, or a vendor's — and so adds the
|
|
12
|
+
* fragment request's trace context itself, under the span active as it runs. It appends rather than
|
|
13
|
+
* replaces, and a request carrying two `traceparent`s carries none a receiver may use.
|
|
14
|
+
*/
|
|
15
|
+
function httpClientPropagates() {
|
|
16
|
+
const host = globalThis.process;
|
|
17
|
+
const channels = host?.getBuiltinModule?.('node:diagnostics_channel');
|
|
18
|
+
return channels?.hasSubscribers('undici:request:create') ?? false;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The fragment request's trace context: the fetch span's, never the caller's. Written with the
|
|
22
|
+
* registered propagator (W3C, B3, …), or as a W3C `traceparent` when there is none — unless an
|
|
23
|
+
* HTTP-client instrumentation will write it.
|
|
24
|
+
*/
|
|
25
|
+
function traceHeaders(fetchContext, spanContext) {
|
|
26
|
+
// no span to hand on: the request is left as it is
|
|
27
|
+
if (!trace.isSpanContextValid(spanContext))
|
|
28
|
+
return {};
|
|
29
|
+
// baggage is the gateway's `baggage` option's to decide, and is left alone
|
|
30
|
+
const fields = propagation.fields().filter((field) => field !== 'baggage');
|
|
31
|
+
const headers = {};
|
|
32
|
+
for (const field of ['traceparent', 'tracestate', ...fields])
|
|
33
|
+
headers[field] = null;
|
|
34
|
+
if (httpClientPropagates())
|
|
35
|
+
return headers;
|
|
36
|
+
if (fields.length) {
|
|
37
|
+
propagation.inject(fetchContext, headers);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
headers['traceparent'] = traceparent(spanContext);
|
|
41
|
+
const traceState = spanContext.traceState?.serialize();
|
|
42
|
+
if (traceState)
|
|
43
|
+
headers['tracestate'] = traceState;
|
|
44
|
+
}
|
|
45
|
+
return headers;
|
|
46
|
+
}
|
|
47
|
+
function endFetchSpan(span, event, error) {
|
|
48
|
+
span.setAttribute('braid.fetch.outcome', event.outcome);
|
|
49
|
+
if (event.status !== undefined)
|
|
50
|
+
span.setAttribute('http.response.status_code', event.status);
|
|
51
|
+
// joined a fetch already in flight: the endpoint saw another span's trace context, not this one's
|
|
52
|
+
if (event.coalesced)
|
|
53
|
+
span.setAttribute('braid.fetch.coalesced', true);
|
|
54
|
+
const errorType = event.outcome === 'timeout'
|
|
55
|
+
? 'timeout'
|
|
56
|
+
: event.outcome === 'shed'
|
|
57
|
+
? 'braid.circuit_open'
|
|
58
|
+
: event.outcome === 'error'
|
|
59
|
+
? error instanceof Error
|
|
60
|
+
? error.name
|
|
61
|
+
: '_OTHER'
|
|
62
|
+
: event.status !== undefined && event.status >= 500
|
|
63
|
+
? String(event.status)
|
|
64
|
+
: undefined;
|
|
65
|
+
if (errorType) {
|
|
66
|
+
span.setAttribute('error.type', errorType);
|
|
67
|
+
span.setStatus({ code: SpanStatusCode.ERROR });
|
|
68
|
+
if (error instanceof Error)
|
|
69
|
+
span.recordException(error);
|
|
70
|
+
}
|
|
71
|
+
span.end();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Breaker transitions and web vitals, as events on the active span: the request span the
|
|
75
|
+
* deployment's HTTP instrumentation opened — for a web vital, the beacon request that carried it.
|
|
76
|
+
*/
|
|
77
|
+
function recordEvent(event) {
|
|
78
|
+
const active = trace.getActiveSpan();
|
|
79
|
+
if (!active?.isRecording())
|
|
80
|
+
return;
|
|
81
|
+
if (event.kind === 'breaker') {
|
|
82
|
+
active.addEvent('braid.breaker.transition', {
|
|
83
|
+
'braid.fragment.id': event.fragmentId,
|
|
84
|
+
'braid.breaker.from': event.from,
|
|
85
|
+
'braid.breaker.to': event.to,
|
|
86
|
+
'braid.breaker.failures': event.failures,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
else if (event.kind === 'web-vital') {
|
|
90
|
+
active.addEvent('browser.web_vital', {
|
|
91
|
+
'browser.web_vital.name': event.name,
|
|
92
|
+
'browser.web_vital.value': event.value,
|
|
93
|
+
'browser.web_vital.rating': event.rating,
|
|
94
|
+
...(event.fragmentId === null ? {} : { 'braid.fragment.id': event.fragmentId }),
|
|
95
|
+
'url.path': event.pathname,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Gateway telemetry that records fragment fetches as OpenTelemetry spans.
|
|
101
|
+
*
|
|
102
|
+
* ```ts
|
|
103
|
+
* createGateway({ registry, telemetry: otelGatewayTelemetry({ webVitals: true }) });
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* Accepts every other `telemetry` option, and passes events to an `on` given here too.
|
|
107
|
+
*/
|
|
108
|
+
export function otelGatewayTelemetry(options = {}) {
|
|
109
|
+
if ('onFragmentFetch' in options) {
|
|
110
|
+
throw new TypeError('otelGatewayTelemetry() opens the fragment fetch spans itself; it takes no onFragmentFetch');
|
|
111
|
+
}
|
|
112
|
+
const { tracerProvider, on, ...rest } = options;
|
|
113
|
+
const tracer = () => (tracerProvider ?? trace.getTracerProvider()).getTracer(TRACER_NAME);
|
|
114
|
+
return {
|
|
115
|
+
...rest,
|
|
116
|
+
on(event) {
|
|
117
|
+
try {
|
|
118
|
+
recordEvent(event);
|
|
119
|
+
}
|
|
120
|
+
finally {
|
|
121
|
+
on?.(event);
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
onFragmentFetch({ fragmentId, phase, method }) {
|
|
125
|
+
const known = HTTP_METHODS.has(method);
|
|
126
|
+
const parent = context.active();
|
|
127
|
+
const span = tracer().startSpan(`${known ? method : 'HTTP'} ${fragmentId}`, {
|
|
128
|
+
kind: SpanKind.CLIENT,
|
|
129
|
+
attributes: {
|
|
130
|
+
'braid.fragment.id': fragmentId,
|
|
131
|
+
'braid.fetch.phase': phase,
|
|
132
|
+
'http.request.method': known ? method : '_OTHER',
|
|
133
|
+
...(known ? {} : { 'http.request.method_original': method }),
|
|
134
|
+
},
|
|
135
|
+
}, parent);
|
|
136
|
+
// The fetch runs with this span active, so an HTTP client's own span nests under it — and with
|
|
137
|
+
// no baggage, because a propagator injecting the request's would hand the fragment the
|
|
138
|
+
// browser's, which the gateway's `baggage` option exists to filter.
|
|
139
|
+
const fetchContext = propagation.deleteBaggage(trace.setSpan(parent, span));
|
|
140
|
+
return {
|
|
141
|
+
headers: traceHeaders(fetchContext, span.spanContext()),
|
|
142
|
+
run: (fetch) => context.with(fetchContext, fetch),
|
|
143
|
+
end: (event, error) => endFetchSpan(span, event, error),
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
};
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AAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;oBAChD,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,8BAA8B,EAAE,MAAM,EAAE,CAAC;iBAC7D;aACF,EACD,MAAM,CACP,CAAC;YACF,+FAA+F;YAC/F,uFAAuF;YACvF,oEAAoE;YACpE,MAAM,YAAY,GAAG,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;YAC5E,OAAO;gBACL,OAAO,EAAE,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;gBACvD,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC;gBACjD,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC;aACxD,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/src/index.d.ts
ADDED
package/src/index.js
ADDED
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/otel/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC"}
|