@nifrajs/otel 5.1.0 → 5.2.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/CHANGELOG.md +426 -0
- package/package.json +4 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
# @nifrajs/otel
|
|
2
|
+
|
|
3
|
+
## 5.2.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9498cf8: The package ships its `CHANGELOG.md`, so the installed package has the notes for every version, as the GitHub release does. Before, the tarball held only the code, `README.md`, `LICENSE` and `package.json`.
|
|
8
|
+
|
|
9
|
+
## 5.1.0
|
|
10
|
+
|
|
11
|
+
No changes in this release.
|
|
12
|
+
|
|
13
|
+
## 5.0.0
|
|
14
|
+
|
|
15
|
+
### Major Changes
|
|
16
|
+
|
|
17
|
+
- 2f09afb: `tracing()` now reports a matched request's route template as `url.path` (for example `/users/:id`), so an email, an id or a token in a path segment no longer reaches the trace backend. Pass `rawUrlPath: true` to report the raw path as before. Requests that match no route still report their raw path. DevTools installs its own tracing with `rawUrlPath: true`, so its local request log is unchanged.
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- 9de83f4: `otlpExporter` sends one export at a time; spans that end meanwhile wait in the `maxQueue`-bounded queue instead of each opening another POST. A new `timeoutMs` option (default 30000) aborts and reports an export that takes too long. `flush()` resolves once every span queued before the call was sent, failed or dropped, and `shutdown()` waits for the export in flight.
|
|
22
|
+
- fc1a30e: `metrics()` takes an `authorize(req)` option that gates the scrape endpoint; a refused scrape answers 401 with an empty body. Without it the endpoint stays public, which the option's documentation now states.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies [a0a02f4]
|
|
27
|
+
- Updated dependencies [0aed425]
|
|
28
|
+
- Updated dependencies [eaf030b]
|
|
29
|
+
- Updated dependencies [7de0397]
|
|
30
|
+
- Updated dependencies [4199ff3]
|
|
31
|
+
- Updated dependencies [90d9ee6]
|
|
32
|
+
- Updated dependencies [364a234]
|
|
33
|
+
- Updated dependencies [c06cba5]
|
|
34
|
+
- Updated dependencies [f4d3852]
|
|
35
|
+
- Updated dependencies [4a82ae0]
|
|
36
|
+
- Updated dependencies [0ff867a]
|
|
37
|
+
- Updated dependencies [e7391bf]
|
|
38
|
+
- Updated dependencies [0b80a59]
|
|
39
|
+
- Updated dependencies [c64db12]
|
|
40
|
+
- Updated dependencies [3753104]
|
|
41
|
+
- Updated dependencies [4b3b1fa]
|
|
42
|
+
- Updated dependencies [3562557]
|
|
43
|
+
- Updated dependencies [53087f3]
|
|
44
|
+
- Updated dependencies [2def6c7]
|
|
45
|
+
- Updated dependencies [b5b5bc3]
|
|
46
|
+
- Updated dependencies [22e1777]
|
|
47
|
+
- Updated dependencies [3a483cd]
|
|
48
|
+
- Updated dependencies [35f52c7]
|
|
49
|
+
- Updated dependencies [343cb81]
|
|
50
|
+
- Updated dependencies [d91fd44]
|
|
51
|
+
- Updated dependencies [b13e071]
|
|
52
|
+
- Updated dependencies [077657f]
|
|
53
|
+
- Updated dependencies [a5963cb]
|
|
54
|
+
- Updated dependencies [05aac0e]
|
|
55
|
+
- Updated dependencies [1a6616f]
|
|
56
|
+
- Updated dependencies [7775c2b]
|
|
57
|
+
- Updated dependencies [846e2f6]
|
|
58
|
+
- Updated dependencies [aadd9fc]
|
|
59
|
+
- Updated dependencies [ea16748]
|
|
60
|
+
- Updated dependencies [fc0284a]
|
|
61
|
+
- Updated dependencies [5b22f4d]
|
|
62
|
+
- Updated dependencies [1b94593]
|
|
63
|
+
- Updated dependencies [9f58295]
|
|
64
|
+
- Updated dependencies [b9608ac]
|
|
65
|
+
- Updated dependencies [7a165de]
|
|
66
|
+
- Updated dependencies [4064f36]
|
|
67
|
+
- Updated dependencies [48aad8c]
|
|
68
|
+
- Updated dependencies [41050ed]
|
|
69
|
+
- Updated dependencies [fc837cb]
|
|
70
|
+
- Updated dependencies [b80ce77]
|
|
71
|
+
- Updated dependencies [9b1acc9]
|
|
72
|
+
- Updated dependencies [740109f]
|
|
73
|
+
- Updated dependencies [e0a25fe]
|
|
74
|
+
- Updated dependencies [3630b6e]
|
|
75
|
+
- Updated dependencies [1290c6d]
|
|
76
|
+
- Updated dependencies [d0a7d58]
|
|
77
|
+
- @nifrajs/core@5.0.0
|
|
78
|
+
|
|
79
|
+
## 4.0.2
|
|
80
|
+
|
|
81
|
+
## 4.0.1
|
|
82
|
+
|
|
83
|
+
## 4.0.0
|
|
84
|
+
|
|
85
|
+
### Minor Changes
|
|
86
|
+
|
|
87
|
+
- ac703a1: `cacheTracing()` from `@nifrajs/otel/cache` turns `@nifrajs/cache` operations into spans.
|
|
88
|
+
|
|
89
|
+
- Pass it as `createCache({ observer: cacheTracing({ exporter }) })`. Every operation on a view bound with `cache.for(c)` becomes a `cache <op>` child span of `c.trace`, with `nifra.cache.operation`, `nifra.cache.outcome` and `nifra.cache.tag_count`.
|
|
90
|
+
- Raw keys stay in the process. By default a span carries only the key prefix (`user:42` gives `nifra.cache.key_prefix = "user"`); `keyAttribute: "none"` drops it and a function exports its own value.
|
|
91
|
+
- The background refresh of a stale `wrap` is a `cache revalidate` span in its own trace, linked to the request span.
|
|
92
|
+
- `StartObservation.startTime` and `EndObservation.durationMs` record work after it settled.
|
|
93
|
+
|
|
94
|
+
- e1b89c0: `traceEventConsumer()` from `@nifrajs/otel/events` traces an `@nifrajs/events` consumer with one wrapper.
|
|
95
|
+
|
|
96
|
+
- `traceEventConsumer(contractOrRegistry, handler, { exporter })` returns `consume(input, parent?)`. Each envelope is one `process <type>` consumer span, linked to the producer's span through `causalitySpanLink(envelope.causality)`; with a `parent` trace (a webhook route's `c.trace`) the span is its child.
|
|
97
|
+
- Attributes: `nifra.event.type`, `nifra.event.version`, `messaging.message.id` (the envelope id), `messaging.operation.type`/`.name` = `process`, and `messaging.system` (`system` option, default `"nifra.events"`).
|
|
98
|
+
- Input that fails to parse never reaches the handler: it resolves `{ success: false, issueCount }` and records an error span carrying the issue count and, for a registry, its bounded reason. No payload is exported.
|
|
99
|
+
- The handler receives `{ trace }` for nested spans, and `scope` runs it inside an ambient context.
|
|
100
|
+
|
|
101
|
+
- 1afbe9f: `jobTracing()` from `@nifrajs/otel/jobs` traces `@nifrajs/jobs` with OpenTelemetry messaging spans.
|
|
102
|
+
|
|
103
|
+
- Pass it as `createQueue({ instrument: jobTracing({ exporter }) })`.
|
|
104
|
+
- Each enqueue is a `send <job>` producer span (a child of `c.trace` when enqueued through `job.for(c)`), and its context is stored with the job.
|
|
105
|
+
- Each attempt is a `process <job>` consumer span: a child of the send span, plus a link to it. Retries are separate spans; a failed attempt is an error span, and the one that dead-letters the job carries `nifra.job.dead_lettered = true`.
|
|
106
|
+
- Attributes: `messaging.system = "nifra.jobs"`, `messaging.operation.type`, `messaging.operation.name`, `messaging.destination.name`, `messaging.message.id`, `nifra.job.attempt`, `nifra.job.outcome`. Error text is never exported.
|
|
107
|
+
- A malformed stored traceparent starts a new trace; the sampled flag travels with a valid one.
|
|
108
|
+
- `scope` runs each attempt inside an ambient context, such as the OpenTelemetry SDK's.
|
|
109
|
+
|
|
110
|
+
- b8af5cf: `otelBridge()` from `@nifrajs/otel/sdk-bridge` connects nifra spans to the OpenTelemetry SDK. The app passes its own `@opentelemetry/api`; `@nifrajs/otel` adds no dependency.
|
|
111
|
+
|
|
112
|
+
- `bridge.plugin`: `app.use(bridge.plugin)` runs each subsequent route with its request span active in the OTel context, so the SDK's own instrumentations (pg, mysql2, ioredis, undici, prisma) nest under the request span. It costs one `around()` frame per request, only when installed.
|
|
113
|
+
- `bridge.adapter`: mirrors nifra spans into SDK spans (name, kind, parent, links, attributes, status, timing). Pass it in `tracing({ adapters })` and the other tracers' `adapters`.
|
|
114
|
+
- `bridge.idGenerator`: wired as the SDK provider's `idGenerator`, mirrored spans keep nifra's exact trace and span ids, so forwarded `traceparent` headers and the trace context stored with a job name real spans. Without it the adapter warns once.
|
|
115
|
+
- `bridge.scope`: runs code with a nifra span active in the OTel context; pass it as `jobTracing({ scope })` or `traceEventConsumer(..., { scope })` so spans inside a job or event handler nest under it.
|
|
116
|
+
- Context propagation needs the SDK's AsyncLocalStorage context manager. Verified on Node 26, Bun 1.4, Deno 2.9 and workerd with `nodejs_compat`. The SDK's undici instrumentation records `fetch` only on Node, where `fetch` is undici.
|
|
117
|
+
|
|
118
|
+
- 6d87951: Spans carry an OpenTelemetry span kind.
|
|
119
|
+
|
|
120
|
+
- `NifraSpan.kind` and `StartObservation.kind` take `"server" | "client" | "producer" | "consumer" | "internal"`.
|
|
121
|
+
- `otlpExporter()` sends each kind as its OTLP enum value. A span without a kind is sent as `SERVER`.
|
|
122
|
+
- `tracing()` request spans are `server` spans; `effectTracing()` capability spans are `internal` spans.
|
|
123
|
+
- `consoleSpanExporter()` logs the kind when a span has one.
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- 1b2d53a: `replacedRequestOf(request)` returns the request an `onRequest` hook replaced with this one. Response hooks receive the request the route ran with, so a middleware that keyed state on the request its `onRequest` saw can walk back to it. `idempotency()` uses this to keep its claim when a later hook such as `methodOverride()` rewrites the request: a retry replays the stored response instead of answering 409 and then running the handler a second time. `metrics()` uses it to count such requests and to decrement its in-flight gauge for them.
|
|
128
|
+
- 50e68d9: `metrics()` labels a request method outside HTTP's standard set as `_OTHER`, following OpenTelemetry's HTTP conventions. A runtime that accepts extension methods, such as Deno, can no longer be made to create a new series per request.
|
|
129
|
+
- 76b7aa8: `tracing()` names a request span `{method} {route template}` - `GET /users/:id`, not `GET /users/42` - and records the template as `http.route`, as OpenTelemetry's HTTP conventions describe. The raw path stays in `url.path`. A method outside HTTP's own set is recorded as `_OTHER`, with the original in `http.request.method_original`.
|
|
130
|
+
- Updated dependencies [dde125b]
|
|
131
|
+
- Updated dependencies [72b62fa]
|
|
132
|
+
- Updated dependencies [aa44e93]
|
|
133
|
+
- Updated dependencies [4a3ee60]
|
|
134
|
+
- Updated dependencies [aad6297]
|
|
135
|
+
- Updated dependencies [dad0d41]
|
|
136
|
+
- Updated dependencies [538adc2]
|
|
137
|
+
- Updated dependencies [f47edd1]
|
|
138
|
+
- Updated dependencies [df9530a]
|
|
139
|
+
- Updated dependencies [3e6973f]
|
|
140
|
+
- Updated dependencies [25e8edf]
|
|
141
|
+
- Updated dependencies [2b5e5fc]
|
|
142
|
+
- Updated dependencies [3b090de]
|
|
143
|
+
- Updated dependencies [da7d792]
|
|
144
|
+
- Updated dependencies [612a296]
|
|
145
|
+
- Updated dependencies [fb14dfa]
|
|
146
|
+
- Updated dependencies [8ae97f6]
|
|
147
|
+
- Updated dependencies [4af6f39]
|
|
148
|
+
- Updated dependencies [ca8b50d]
|
|
149
|
+
- Updated dependencies [b00a889]
|
|
150
|
+
- Updated dependencies [b53d64f]
|
|
151
|
+
- Updated dependencies [66fd712]
|
|
152
|
+
- Updated dependencies [9c3d524]
|
|
153
|
+
- Updated dependencies [738e7a1]
|
|
154
|
+
- Updated dependencies [4801cac]
|
|
155
|
+
- Updated dependencies [1b2d53a]
|
|
156
|
+
- Updated dependencies [25fe13d]
|
|
157
|
+
- Updated dependencies [0852290]
|
|
158
|
+
- Updated dependencies [0589dbe]
|
|
159
|
+
- Updated dependencies [2e2d8c0]
|
|
160
|
+
- Updated dependencies [856f5ce]
|
|
161
|
+
- Updated dependencies [18aa5aa]
|
|
162
|
+
- Updated dependencies [cfd86b3]
|
|
163
|
+
- Updated dependencies [8ff96c9]
|
|
164
|
+
- Updated dependencies [4c46199]
|
|
165
|
+
- Updated dependencies [eef4932]
|
|
166
|
+
- Updated dependencies [6de8686]
|
|
167
|
+
- Updated dependencies [d7892ea]
|
|
168
|
+
- Updated dependencies [4936309]
|
|
169
|
+
- Updated dependencies [ff5a779]
|
|
170
|
+
- Updated dependencies [bbdc5a1]
|
|
171
|
+
- Updated dependencies [10bc446]
|
|
172
|
+
- Updated dependencies [e8270d9]
|
|
173
|
+
- Updated dependencies [ff4a062]
|
|
174
|
+
- Updated dependencies [43ba944]
|
|
175
|
+
- Updated dependencies [46c741a]
|
|
176
|
+
- Updated dependencies [7bfa25e]
|
|
177
|
+
- Updated dependencies [4936309]
|
|
178
|
+
- Updated dependencies [6e257a6]
|
|
179
|
+
- Updated dependencies [4a03d30]
|
|
180
|
+
- Updated dependencies [8e30090]
|
|
181
|
+
- Updated dependencies [28f3aaf]
|
|
182
|
+
- Updated dependencies [6d20355]
|
|
183
|
+
- Updated dependencies [6907cbe]
|
|
184
|
+
- Updated dependencies [b64c3ee]
|
|
185
|
+
- Updated dependencies [bda9637]
|
|
186
|
+
- Updated dependencies [81c720e]
|
|
187
|
+
- Updated dependencies [ed60b23]
|
|
188
|
+
- Updated dependencies [a158b74]
|
|
189
|
+
- Updated dependencies [ff25d68]
|
|
190
|
+
- @nifrajs/core@4.0.0
|
|
191
|
+
|
|
192
|
+
## 3.5.0
|
|
193
|
+
|
|
194
|
+
## 3.4.0
|
|
195
|
+
|
|
196
|
+
## 3.3.0
|
|
197
|
+
|
|
198
|
+
## 3.2.0
|
|
199
|
+
|
|
200
|
+
## 3.1.0
|
|
201
|
+
|
|
202
|
+
## 3.0.0
|
|
203
|
+
|
|
204
|
+
### Patch Changes
|
|
205
|
+
|
|
206
|
+
- Updated dependencies [f3d2a35]
|
|
207
|
+
- Updated dependencies [6e43c15]
|
|
208
|
+
- Updated dependencies [f0fd370]
|
|
209
|
+
- Updated dependencies [86a555b]
|
|
210
|
+
- Updated dependencies [8c5f4cf]
|
|
211
|
+
- Updated dependencies [f0fd370]
|
|
212
|
+
- Updated dependencies [381bbf3]
|
|
213
|
+
- Updated dependencies [36801ae]
|
|
214
|
+
- Updated dependencies [9acadba]
|
|
215
|
+
- Updated dependencies [99fc683]
|
|
216
|
+
- Updated dependencies [73d894d]
|
|
217
|
+
- @nifrajs/core@3.0.0
|
|
218
|
+
|
|
219
|
+
## 2.14.1
|
|
220
|
+
|
|
221
|
+
## 2.14.0
|
|
222
|
+
|
|
223
|
+
## 2.13.0
|
|
224
|
+
|
|
225
|
+
## 2.12.1
|
|
226
|
+
|
|
227
|
+
## 2.12.0
|
|
228
|
+
|
|
229
|
+
### Minor Changes
|
|
230
|
+
|
|
231
|
+
- 0efacea: Add a generic server `onStop` lifecycle hook and have OTLP tracing exporters flush and shut down automatically when attached to a server. Manual OTLP lifecycle calls remain available for standalone exporters.
|
|
232
|
+
- 9a9346e: `app.use(plugin)` keeps the caller's server type. A plugin built with `definePlugin` whose input
|
|
233
|
+
server type is not pinned used to widen the app to `Server<any, any>`, so every route declared
|
|
234
|
+
before _and_ after the `use` lost its types and the typed client silently degraded to `any`. That
|
|
235
|
+
case is now a compile error at the `use` call site, naming the definer to switch to; the plugin is
|
|
236
|
+
unchanged at runtime.
|
|
237
|
+
|
|
238
|
+
Pick the definer that matches what the plugin does: `defineContextPlugin<D>` when it adds context
|
|
239
|
+
via `derive`/`decorate` (the registry threads through and `D` is added to every downstream handler
|
|
240
|
+
context), `defineRouterPlugin` when it mounts routes/hooks and adds no context (mount as a side
|
|
241
|
+
effect, return the app). `definePlugin` still works when its input type is pinned - annotate the
|
|
242
|
+
parameter (`(app: typeof api) => ...`) or pass explicit type arguments.
|
|
243
|
+
|
|
244
|
+
Every first-party plugin now threads: `jwt`, `tokenAuth`, `basicAuth`, `durableCommand`, `etag`,
|
|
245
|
+
`compression`, `problemDetails`, `prettyJson`, `methodOverride`, `trailingSlash`, `cacheControl`,
|
|
246
|
+
`devtools`, and `metrics` return an `IdentityPlugin`; `timing`, `language`, and `tracing` return a
|
|
247
|
+
`ContextPlugin` of what they add (`{ timing }`, `{ language, languageMatch }`, and
|
|
248
|
+
`{ trace, observation, causality }` respectively), so `c.timing` / `c.language` / `c.trace` are
|
|
249
|
+
typed without a manual annotation. `combine(...)` is typed as an identity bundle and
|
|
250
|
+
`namedCombine(name, ...)` is its deduped, named form.
|
|
251
|
+
|
|
252
|
+
A type-level test asserts the threading for each definer shape, so a regression fails `typecheck`
|
|
253
|
+
rather than surfacing as `any` in a downstream app.
|
|
254
|
+
|
|
255
|
+
## 2.11.0
|
|
256
|
+
|
|
257
|
+
## 2.10.0
|
|
258
|
+
|
|
259
|
+
## 2.9.1
|
|
260
|
+
|
|
261
|
+
## 2.9.0
|
|
262
|
+
|
|
263
|
+
## 2.8.2
|
|
264
|
+
|
|
265
|
+
## 2.8.1
|
|
266
|
+
|
|
267
|
+
## 2.8.0
|
|
268
|
+
|
|
269
|
+
## 2.7.1
|
|
270
|
+
|
|
271
|
+
## 2.7.0
|
|
272
|
+
|
|
273
|
+
## 2.6.1
|
|
274
|
+
|
|
275
|
+
## 2.6.0
|
|
276
|
+
|
|
277
|
+
## 2.5.0
|
|
278
|
+
|
|
279
|
+
## 2.4.0
|
|
280
|
+
|
|
281
|
+
## 2.3.0
|
|
282
|
+
|
|
283
|
+
## 2.2.0
|
|
284
|
+
|
|
285
|
+
## 2.1.0
|
|
286
|
+
|
|
287
|
+
### Minor Changes
|
|
288
|
+
|
|
289
|
+
- bd294bb: Add `executeCapability()` as a correlated, policy-aware effect boundary.
|
|
290
|
+
|
|
291
|
+
- Correlate intent and terminal evidence with a random `effectId`, record committed/failed outcomes
|
|
292
|
+
automatically, and combine request cancellation with bounded async `aroundCapability()` admission
|
|
293
|
+
policies while preserving the synchronous `useCapability()` path.
|
|
294
|
+
- Retain idempotency results for every completed response, including non-2xx outcomes, so a retry
|
|
295
|
+
cannot repeat an effect that succeeded before a later handler failure.
|
|
296
|
+
- Add durable approval, effect journal, saga/compensation, and reconciliation primitives behind the
|
|
297
|
+
`durable-execution` subpath, plus token-only OpenTelemetry effect spans from `@nifrajs/otel/effects`.
|
|
298
|
+
Reconciliation supports bounded cursor pages, approval resume tokens stay out of ordinary error
|
|
299
|
+
serialization, durable terminal states are monotonic, crash ambiguity has an effect-ID-bound operator
|
|
300
|
+
resolution API, and unmatched effect spans have bounded retention.
|
|
301
|
+
- Add one shared owned-effect scope across capabilities, saga execution, compensation, idempotency
|
|
302
|
+
evidence, durable transitions, and telemetry. An explicit `markIdempotencySafeToRetry()` outcome
|
|
303
|
+
releases a resolved 5xx only while the scope proves no effect began.
|
|
304
|
+
- Add negotiated, versioned transport codecs with bounded plain-JSON and rich-wire adapters for HTTP,
|
|
305
|
+
the typed client, loader NDJSON, and WebSocket frames.
|
|
306
|
+
- Add Postgres, SQLite, and Durable Object durable-execution adapters with one reusable conformance
|
|
307
|
+
suite, plus leased reconciliation workers with bounded pages/concurrency, durable cursors, filters,
|
|
308
|
+
cancellation, backpressure, and token-only metrics.
|
|
309
|
+
|
|
310
|
+
## 2.0.0
|
|
311
|
+
|
|
312
|
+
### Major Changes
|
|
313
|
+
|
|
314
|
+
- d91a45b: Remove Nifra's remaining deprecated and compatibility-only public surfaces for the 2.0 cutover.
|
|
315
|
+
|
|
316
|
+
- `@nifrajs/core` and `nifra` now expose only the lean HTTP server API at their package roots. Import
|
|
317
|
+
optional systems from their documented subpaths. The deprecated invariant runner and the
|
|
318
|
+
`@nifrajs/budget` compatibility package are removed; use `@nifrajs/testing` and
|
|
319
|
+
`@nifrajs/core/budget` respectively.
|
|
320
|
+
- Web redirects accept only an options object as their second argument, the prerender enumeration
|
|
321
|
+
wrapper is removed in favor of `enumerateStaticRoutes()`, and fragment navigation resolves IDs only.
|
|
322
|
+
- MCP Apps metadata uses only `_meta.ui.resourceUri`; the deprecated flat `ui/resourceUri` key is gone.
|
|
323
|
+
- Telemetry uses `ObservationAdapter` directly; the `AgentSpan`, `AgentSpanExporter`, and `SpanExporter`
|
|
324
|
+
aliases are removed.
|
|
325
|
+
- Invalid HTTP method overrides always fail closed with 400; the legacy ignore mode is removed.
|
|
326
|
+
- `nifra build` always emits a complete target deploy directory and defaults to Bun. The old
|
|
327
|
+
client-only build branch is removed; `nifra start` runs the generated Bun `server.js`.
|
|
328
|
+
|
|
329
|
+
### Minor Changes
|
|
330
|
+
|
|
331
|
+
- bc46cc9: Production observability: a batching OTLP span exporter and RED metrics.
|
|
332
|
+
|
|
333
|
+
- `otlpExporter({ url, headers?, batch?, onError? })` ships spans to any OpenTelemetry collector over OTLP/HTTP (JSON) with in-process batching - dependency-free and edge-safe, matching the package's no-SDK stance. `tracing({ exporter: otlpExporter({ url: "http://localhost:4318/v1/traces" }) })` is now production-usable without writing your own exporter. `flush()`/`shutdown()` drain on graceful stop.
|
|
334
|
+
- `.use(metrics())` from `@nifrajs/otel/metrics` records RED metrics - `nifra_http_requests_total`, `nifra_http_request_duration_seconds`, `nifra_http_requests_in_flight` - labeled by method, the matched route TEMPLATE (so `/users/:id` is one series, not one per id), and status, and exposes them in Prometheus text at `/metrics`. `createMetricsRegistry()` lets an app register custom counters/gauges/histograms that render at the same endpoint. Zero dependencies; the subpath keeps it out of tracing-only bundles.
|
|
335
|
+
|
|
336
|
+
### Patch Changes
|
|
337
|
+
|
|
338
|
+
- ade0c7a: Add a curated `@nifrajs/core/server` entry for the common HTTP runtime and dedicated subpaths for
|
|
339
|
+
contracts, classification, cookies, logging, routing, Standard Schema, SEO, SSE, and webhooks. The
|
|
340
|
+
package root remains backwards compatible, while new scaffolds and first-party runtime packages avoid
|
|
341
|
+
eagerly parsing opt-in causality, invariant, manifest, reflection, capability, and assurance tooling.
|
|
342
|
+
- Updated dependencies [a7b1d60]
|
|
343
|
+
- Updated dependencies [eaac3d7]
|
|
344
|
+
- Updated dependencies [ade0c7a]
|
|
345
|
+
- Updated dependencies [82676e0]
|
|
346
|
+
- Updated dependencies [1522d06]
|
|
347
|
+
- Updated dependencies [a7b1d60]
|
|
348
|
+
- Updated dependencies [a7b1d60]
|
|
349
|
+
- @nifrajs/core@2.0.0
|
|
350
|
+
|
|
351
|
+
## 1.13.0
|
|
352
|
+
|
|
353
|
+
## 1.12.0
|
|
354
|
+
|
|
355
|
+
### Minor Changes
|
|
356
|
+
|
|
357
|
+
- 63d3845: Add bounded execution-causality contracts and propagation, OpenTelemetry causal links, event-envelope lineage, and a deterministic durable failure laboratory. `nifra levels` L4 now uses the deep adversarial contract engine through its explicitly isolated executor. Also add hash-verifiable adapter certification profiles and duplicate physical Nifra/React install detection in `nifra doctor`/`nifra check`.
|
|
358
|
+
|
|
359
|
+
## 1.11.0
|
|
360
|
+
|
|
361
|
+
## 1.10.0
|
|
362
|
+
|
|
363
|
+
## 1.9.1
|
|
364
|
+
|
|
365
|
+
## 1.9.0
|
|
366
|
+
|
|
367
|
+
## 1.8.0
|
|
368
|
+
|
|
369
|
+
## 1.7.0
|
|
370
|
+
|
|
371
|
+
## 1.6.0
|
|
372
|
+
|
|
373
|
+
### Minor Changes
|
|
374
|
+
|
|
375
|
+
- d228ac4: `ActiveObservation.setAttributes(attributes)` - merge attributes onto the in-flight request span from a handler or later plugin (`c.observation.setAttributes({ "tenant.key": ... })`), for facts learned mid-request (authenticated principal, flag bucket, cache verdict). Silently a no-op once the observation has ended; the exported span stays immutable.
|
|
376
|
+
|
|
377
|
+
## 1.5.0
|
|
378
|
+
|
|
379
|
+
### Patch Changes
|
|
380
|
+
|
|
381
|
+
- bd3433f: Security + correctness hardening: `FileStorage` refuses paths that cross symbolic links (component-wise `lstat` walk + `O_NOFOLLOW` writes; `list()` skips symlinks) so a planted symlink can no longer redirect reads/writes outside the storage root. OTel spans no longer copy raw `Error.message` into exported attributes (exception text routinely carries credentials/URLs); spans record `error.recorded: true` instead. New `onResponseFinalized` terminal observer on the server (`Middleware.onResponseFinalized` / `ResponseFinalization`) runs after every transforming `onResponse` hook and is fail-open - tracing now records the true final status even when a later hook rewrites or throws. OpenAPI generation sanitizes URI-style `$id` values into valid component names/`$ref` pointers (hex-derived, collision-suffixed) and is immune to `__proto__` key pollution.
|
|
382
|
+
|
|
383
|
+
## 1.4.0
|
|
384
|
+
|
|
385
|
+
### Minor Changes
|
|
386
|
+
|
|
387
|
+
- 4d25970: Add one fail-open request-observation lifecycle shared by tracing, agent telemetry, and DevTools; secured development tooling; contract-based mock responses; validator-neutral schema/route reflection; executable render and storage adapter conformance modules; optional storage pagination/signing/copy capabilities; and metadata-preserving local file storage.
|
|
388
|
+
|
|
389
|
+
## 1.3.1
|
|
390
|
+
|
|
391
|
+
## 1.3.0
|
|
392
|
+
|
|
393
|
+
## 1.2.2
|
|
394
|
+
|
|
395
|
+
## 1.2.1
|
|
396
|
+
|
|
397
|
+
## 1.2.0
|
|
398
|
+
|
|
399
|
+
## 1.1.0
|
|
400
|
+
|
|
401
|
+
## 1.0.0
|
|
402
|
+
|
|
403
|
+
### Patch Changes
|
|
404
|
+
|
|
405
|
+
- Updated dependencies [f1f0e18]
|
|
406
|
+
- Updated dependencies [3efb7cd]
|
|
407
|
+
- Updated dependencies [de9675b]
|
|
408
|
+
- @nifrajs/core@1.0.0
|
|
409
|
+
|
|
410
|
+
## 1.0.0-beta.4
|
|
411
|
+
|
|
412
|
+
### Patch Changes
|
|
413
|
+
|
|
414
|
+
- @nifrajs/core@1.0.0-beta.4
|
|
415
|
+
|
|
416
|
+
## 1.0.0-beta.3
|
|
417
|
+
|
|
418
|
+
### Patch Changes
|
|
419
|
+
|
|
420
|
+
- @nifrajs/core@1.0.0-beta.3
|
|
421
|
+
|
|
422
|
+
## 0.1.0-beta.2
|
|
423
|
+
|
|
424
|
+
### Patch Changes
|
|
425
|
+
|
|
426
|
+
- @nifrajs/core@0.1.0-beta.2
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nifrajs/otel",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Distributed tracing for nifra - W3C traceparent/tracestate propagation + OpenTelemetry-semantic-convention spans via a pluggable exporter. Bridge to the OpenTelemetry SDK or log spans directly; no SDK bundled. Edge-safe.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -61,7 +61,8 @@
|
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist",
|
|
64
|
-
"src"
|
|
64
|
+
"src",
|
|
65
|
+
"CHANGELOG.md"
|
|
65
66
|
],
|
|
66
67
|
"sideEffects": false,
|
|
67
68
|
"scripts": {
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"access": "public"
|
|
73
74
|
},
|
|
74
75
|
"peerDependencies": {
|
|
75
|
-
"@nifrajs/core": "^5.
|
|
76
|
+
"@nifrajs/core": "^5.2.0"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
79
|
"@nifrajs/cache": "workspace:*",
|