@dudousxd/nestjs-diagnostics 0.8.0 → 0.9.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 +22 -0
- package/README.md +31 -1
- package/dist/channel.d.ts +1 -1
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js +3 -1
- package/dist/channel.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/nestjs/delivery.d.ts +92 -0
- package/dist/nestjs/delivery.d.ts.map +1 -0
- package/dist/nestjs/delivery.js +2 -0
- package/dist/nestjs/delivery.js.map +1 -0
- package/dist/nestjs/diagnostics.explorer.d.ts +51 -11
- package/dist/nestjs/diagnostics.explorer.d.ts.map +1 -1
- package/dist/nestjs/diagnostics.explorer.js +209 -53
- package/dist/nestjs/diagnostics.explorer.js.map +1 -1
- package/dist/nestjs/diagnostics.module.d.ts +9 -2
- package/dist/nestjs/diagnostics.module.d.ts.map +1 -1
- package/dist/nestjs/diagnostics.module.js +23 -3
- package/dist/nestjs/diagnostics.module.js.map +1 -1
- package/dist/nestjs/diagnostics.options.d.ts +31 -0
- package/dist/nestjs/diagnostics.options.d.ts.map +1 -0
- package/dist/nestjs/diagnostics.options.js +3 -0
- package/dist/nestjs/diagnostics.options.js.map +1 -0
- package/dist/nestjs/index.d.ts +6 -3
- package/dist/nestjs/index.d.ts.map +1 -1
- package/dist/nestjs/index.js +4 -2
- package/dist/nestjs/index.js.map +1 -1
- package/dist/nestjs/on-diagnostic.decorator.d.ts +33 -7
- package/dist/nestjs/on-diagnostic.decorator.d.ts.map +1 -1
- package/dist/nestjs/on-diagnostic.decorator.js +0 -9
- package/dist/nestjs/on-diagnostic.decorator.js.map +1 -1
- package/dist/nestjs/queue-transport.d.ts +47 -0
- package/dist/nestjs/queue-transport.d.ts.map +1 -0
- package/dist/nestjs/queue-transport.js +45 -0
- package/dist/nestjs/queue-transport.js.map +1 -0
- package/dist/nestjs/role.d.ts +13 -0
- package/dist/nestjs/role.d.ts.map +1 -0
- package/dist/nestjs/role.js +13 -0
- package/dist/nestjs/role.js.map +1 -0
- package/dist/nestjs/transports.d.ts +125 -0
- package/dist/nestjs/transports.d.ts.map +1 -0
- package/dist/nestjs/transports.js +127 -0
- package/dist/nestjs/transports.js.map +1 -0
- package/dist/official.d.ts +2 -2
- package/dist/redis-relay.d.ts +60 -0
- package/dist/redis-relay.d.ts.map +1 -0
- package/dist/redis-relay.js +170 -0
- package/dist/redis-relay.js.map +1 -0
- package/dist/relayed.d.ts +8 -0
- package/dist/relayed.d.ts.map +1 -0
- package/dist/relayed.js +31 -0
- package/dist/relayed.js.map +1 -0
- package/dist/trace.d.ts.map +1 -1
- package/dist/trace.js +2 -0
- package/dist/trace.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -6
- package/skills/emit-diagnostics/SKILL.md +5 -2
- package/skills/react-with-on-diagnostic/SKILL.md +41 -13
- package/skills/trace-spans/SKILL.md +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @dudousxd/nestjs-diagnostics
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#81](https://github.com/DavideCarvalho/nestjs-diagnostics/pull/81) [`ebdacd0`](https://github.com/DavideCarvalho/nestjs-diagnostics/commit/ebdacd09676892eca5bf2d359b6edd8079600015) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Listeners with delivery transports and `role`.
|
|
8
|
+
|
|
9
|
+
- Every envelope from `emit` and `trace` carries a unique `id` (a UUID). Relays keep it, so the same event has the same `id` in every process.
|
|
10
|
+
- `@OnDiagnostic(lib, event?)` accepts a `RegExp` for `event`, and checks the handler's parameter against the `ChannelRegistry` payload for registered channels. Each listener has a stable id, `<ClassName>#<method>`; two listener classes with the same name fail the bootstrap.
|
|
11
|
+
- `DiagnosticsModule.forRoot({ default, transports, role, nodeId })` and `forRootAsync(...)` select how listeners run across processes, with the `transports` factory:
|
|
12
|
+
- `transports.redis({ pub, sub })`: broadcast over Redis pub/sub, best-effort.
|
|
13
|
+
- `transports.queue({ connection })`: one BullMQ job per `(listener, event)`, retried when the handler throws (optional peer `bullmq`).
|
|
14
|
+
- `transports.durable(options)`: one durable run per `(listener, event)` through `@dudousxd/nestjs-durable-diagnostics/delivery`, imported only when selected; bootstrap fails with a clear message when it is missing or durable is not configured.
|
|
15
|
+
With `queue` and `durable`, delivery happens once, from the emitting process.
|
|
16
|
+
- `role: 'all' | 'api' | 'worker'`: `'api'` emits and hands work to the transport but never consumes or runs listeners. `'api'`/`'worker'` without a `default` transport fail the bootstrap.
|
|
17
|
+
- The Redis relay now lives in `@dudousxd/nestjs-diagnostics` (`createDiagnosticsRedisRelay`); `@dudousxd/nestjs-diagnostics-redis` re-exports it. It takes `receive: false` for a publish-only relay (then `sub` is optional), and marks re-emitted copies (`isRelayed`).
|
|
18
|
+
|
|
19
|
+
## 0.8.1
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#77](https://github.com/DavideCarvalho/nestjs-diagnostics/pull/77) [`5730846`](https://github.com/DavideCarvalho/nestjs-diagnostics/commit/5730846a07b685effba58b344004722dc4d7f08c) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Docs: `OfficialDiagnosticEvent` TSDoc no longer says Telescope's `DiagnosticWatcher` records `nestjs:*`; READMEs note the removed-channel test and the Telescope peer range.
|
|
24
|
+
|
|
3
25
|
## 0.8.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -119,7 +119,8 @@ off();
|
|
|
119
119
|
|
|
120
120
|
The channel lists are exported per lib in one file, pinned to the official
|
|
121
121
|
versions they were verified against (`OFFICIAL_PACKAGE_VERSIONS`). A test
|
|
122
|
-
re-reads the installed packages and fails if a channel is added or
|
|
122
|
+
re-reads the installed packages and fails if a channel is added, renamed or
|
|
123
|
+
removed.
|
|
123
124
|
|
|
124
125
|
| Lib | Constant | Channels |
|
|
125
126
|
| --- | --- | --- |
|
|
@@ -183,6 +184,35 @@ handler that throws or rejects is logged and swallowed — it can never break th
|
|
|
183
184
|
code that emitted. `@nestjs/common` + `@nestjs/core` are optional peers; the main
|
|
184
185
|
barrel stays framework-agnostic.
|
|
185
186
|
|
|
187
|
+
`event` also takes a `RegExp`. Each listener has a stable id, `<ClassName>#<method>`.
|
|
188
|
+
|
|
189
|
+
### Across processes: transports and `role`
|
|
190
|
+
|
|
191
|
+
Pick a `default` transport to run listeners across processes:
|
|
192
|
+
|
|
193
|
+
```ts
|
|
194
|
+
import { DiagnosticsModule, transports } from '@dudousxd/nestjs-diagnostics/nestjs';
|
|
195
|
+
|
|
196
|
+
DiagnosticsModule.forRoot({
|
|
197
|
+
role: 'api', // 'all' (default) | 'api' | 'worker'
|
|
198
|
+
default: 'queue',
|
|
199
|
+
transports: {
|
|
200
|
+
redis: transports.redis({ pub: redis, sub: redis.duplicate() }), // broadcast, best-effort
|
|
201
|
+
queue: transports.queue({ connection: { host: 'localhost', port: 6379 } }), // BullMQ, retried
|
|
202
|
+
durable: transports.durable({ retries: 5 }), // durable runs (@dudousxd/nestjs-durable-diagnostics)
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
| transport | where the listener runs | lost if the process dies? | if the handler throws |
|
|
208
|
+
|---|---|---|---|
|
|
209
|
+
| none (local) | in the emitting process | yes | logged, dropped |
|
|
210
|
+
| `redis` | in every process (broadcast) | yes | logged, dropped |
|
|
211
|
+
| `queue` | in one worker | no | BullMQ retries the job (at-least-once) |
|
|
212
|
+
| `durable` | in one durable worker | no | durable retries with backoff; idempotent per event id |
|
|
213
|
+
|
|
214
|
+
See the [Listeners and transports](https://davidecarvalho.github.io/aviary/docs/diagnostics/listeners) docs.
|
|
215
|
+
|
|
186
216
|
## License
|
|
187
217
|
|
|
188
218
|
MIT
|
package/dist/channel.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare function getChannel(lib: string, event: string): Channel;
|
|
|
38
38
|
* - When `opts.sample` is given, it is consulted AFTER the `hasSubscribers` gate
|
|
39
39
|
* and BEFORE the envelope is built: a falsy result sheds this event without
|
|
40
40
|
* allocating anything. Default (no `sample`) always publishes when subscribed.
|
|
41
|
-
* - The envelope carries the current {@link SCHEMA_VERSION} as `v`.
|
|
41
|
+
* - The envelope carries the current {@link SCHEMA_VERSION} as `v` and a fresh UUID as `id`.
|
|
42
42
|
* - Never throws: emitting observability must not break the caller.
|
|
43
43
|
*
|
|
44
44
|
* ```ts
|
package/dist/channel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AACA,OAA4B,EAAE,KAAK,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAG7E,OAAO,KAAK,EAAmB,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE1F,gEAAgE;AAChE,eAAO,MAAM,cAAc,WAAW,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9D;AAqBD;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAc9D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,IAAI,SAAS,KAAK,EAAE,MAAM,SAAS,OAAO,CAAC,IAAI,CAAC,EACnE,GAAG,EAAE,IAAI,EACT,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,EAChC,IAAI,CAAC,EAAE,WAAW,GACjB,IAAI,CAwBN"}
|
package/dist/channel.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
1
2
|
import diagnostics_channel from 'node:diagnostics_channel';
|
|
2
3
|
import { resolveTraceId } from './context-accessor.js';
|
|
3
4
|
import { onRegistryReset, registerChannel } from './registry.js';
|
|
@@ -74,7 +75,7 @@ export function getChannel(lib, event) {
|
|
|
74
75
|
* - When `opts.sample` is given, it is consulted AFTER the `hasSubscribers` gate
|
|
75
76
|
* and BEFORE the envelope is built: a falsy result sheds this event without
|
|
76
77
|
* allocating anything. Default (no `sample`) always publishes when subscribed.
|
|
77
|
-
* - The envelope carries the current {@link SCHEMA_VERSION} as `v`.
|
|
78
|
+
* - The envelope carries the current {@link SCHEMA_VERSION} as `v` and a fresh UUID as `id`.
|
|
78
79
|
* - Never throws: emitting observability must not break the caller.
|
|
79
80
|
*
|
|
80
81
|
* ```ts
|
|
@@ -100,6 +101,7 @@ export function emit(lib, event, payload, opts) {
|
|
|
100
101
|
const traceId = opts?.traceId ?? resolveTraceId();
|
|
101
102
|
const envelope = {
|
|
102
103
|
v: SCHEMA_VERSION,
|
|
104
|
+
id: randomUUID(),
|
|
103
105
|
ts: Date.now(),
|
|
104
106
|
lib,
|
|
105
107
|
event,
|
package/dist/channel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAqC,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,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I,IAAI,EAAE,MAAM,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAAE,OAAO;QACzD,MAAM,OAAO,GAAG,IAAI,EAAE,OAAO,IAAI,cAAc,EAAE,CAAC;QAClD,MAAM,QAAQ,GAAoB;YAChC,CAAC,EAAE,cAAc;YACjB,EAAE,EAAE,UAAU,EAAE;YAChB,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE;YACd,GAAG;YACH,KAAK;YACL,OAAO;YACP,OAAO;YACP,wEAAwE;YACxE,yEAAyE;YACzE,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC;SACvE,CAAC;QACF,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,yDAAyD;IAC3D,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export { claimDiagnostics, isDiagnosticClaimed } from './claims.js';
|
|
|
5
5
|
export { assertCapabilityNaming } from './conformance.js';
|
|
6
6
|
export { CONTEXT_ACCESSOR, type ContextAccessor, type ContextStore, getContextAccessor, resolveTraceId, setContextAccessor, type UserRef, } from './context-accessor.js';
|
|
7
7
|
export { NESTJS_AUTHENTICATION_CHANNELS, NESTJS_AUTHORIZATION_CHANNELS, NESTJS_MAIL_CHANNELS, NESTJS_RESILIENCE_CHANNELS, NESTJS_WORKFLOWS_CHANNELS, OFFICIAL_CHANNEL_PREFIX, OFFICIAL_CHANNELS, OFFICIAL_PACKAGE_VERSIONS, type OfficialChannelName, type OfficialDiagnosticEvent, type OfficialLib, type OfficialListener, type OfficialType, officialChannelNames, subscribeOfficial, } from './official.js';
|
|
8
|
+
export { type ChannelRef, createDiagnosticsRedisRelay, type DiagnosticsRedisRelayOptions, type RedisLike, type RedisPipelineLike, } from './redis-relay.js';
|
|
9
|
+
export { isRelayed, publishRelayed } from './relayed.js';
|
|
8
10
|
export { onChannelRegistered, registerChannel, registeredChannels, resetRegistry, } from './registry.js';
|
|
9
11
|
export { SPAN_SCHEMA_VERSION, trace, type TraceChannelNames, traceChannelNames, type TracingChannel, tracingChannel, } from './trace.js';
|
|
10
12
|
export type { ChannelRegistry, DiagnosticEvent, EmitOptions, EventOf, LibOf, PayloadOf, SpanEvent, SpanPhase, TraceOptions, } from './types.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,KAAK,OAAO,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC7B,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,uBAAuB,EACvB,iBAAiB,EACjB,yBAAyB,EACzB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,O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AAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,mBAAmB,EACnB,KAAK,EACL,KAAK,iBAAiB,EACtB,iBAAiB,EACjB,KAAK,cAAc,EACnB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,eAAe,EACf,eAAe,EACf,WAAW,EACX,OAAO,EACP,KAAK,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,YAAY,GACb,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,8 @@ export { claimDiagnostics, isDiagnosticClaimed } from './claims.js';
|
|
|
4
4
|
export { assertCapabilityNaming } from './conformance.js';
|
|
5
5
|
export { CONTEXT_ACCESSOR, getContextAccessor, resolveTraceId, setContextAccessor, } from './context-accessor.js';
|
|
6
6
|
export { NESTJS_AUTHENTICATION_CHANNELS, NESTJS_AUTHORIZATION_CHANNELS, NESTJS_MAIL_CHANNELS, NESTJS_RESILIENCE_CHANNELS, NESTJS_WORKFLOWS_CHANNELS, OFFICIAL_CHANNEL_PREFIX, OFFICIAL_CHANNELS, OFFICIAL_PACKAGE_VERSIONS, officialChannelNames, subscribeOfficial, } from './official.js';
|
|
7
|
+
export { createDiagnosticsRedisRelay, } from './redis-relay.js';
|
|
8
|
+
export { isRelayed, publishRelayed } from './relayed.js';
|
|
7
9
|
export { onChannelRegistered, registerChannel, registeredChannels, resetRegistry, } from './registry.js';
|
|
8
10
|
export { SPAN_SCHEMA_VERSION, trace, traceChannelNames, tracingChannel, } from './trace.js';
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC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yB,EAMzB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,2BAA2B,GAI5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,mBAAmB,EACnB,KAAK,EAEL,iBAAiB,EAEjB,cAAc,GACf,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The listener delivery contract. Types only: a transport package (such as
|
|
3
|
+
* `@dudousxd/nestjs-durable-diagnostics`) implements it with `import type` and never loads
|
|
4
|
+
* diagnostics at runtime.
|
|
5
|
+
*
|
|
6
|
+
* Lifecycle, in every process that boots `DiagnosticsModule` with a delivering transport selected:
|
|
7
|
+
*
|
|
8
|
+
* 1. At bootstrap, after listeners are discovered, the transport is created with a
|
|
9
|
+
* {@link DeliveryTransportContext}. Unless `role` is `'api'`, it must also set up whatever runs
|
|
10
|
+
* deliveries (a worker, a workflow) in THIS process, because any process may run them.
|
|
11
|
+
* 2. When a process emits an event that matches listeners, diagnostics calls
|
|
12
|
+
* {@link ListenerDeliveryTransport.deliver} in that process only, once per matching listener,
|
|
13
|
+
* off the emitter's call stack, batched per event loop turn, in emit order. Copies of the event
|
|
14
|
+
* that reached other processes through a relay are never delivered again.
|
|
15
|
+
* 3. Wherever the transport runs a delivery, it calls {@link DeliveryTransportContext.invoke}
|
|
16
|
+
* `(listenerId, envelope)`. The promise settles when the handler finishes and rejects with the
|
|
17
|
+
* handler's own error, so the transport can retry.
|
|
18
|
+
* 4. On application shutdown, diagnostics awaits {@link ListenerDeliveryTransport.stop}.
|
|
19
|
+
*/
|
|
20
|
+
import type { ModuleRef } from '@nestjs/core';
|
|
21
|
+
import type { DiagnosticEvent } from '../types.js';
|
|
22
|
+
import type { DiagnosticsRole } from './role.js';
|
|
23
|
+
/** An envelope handed to a delivering transport: `id` is always set. */
|
|
24
|
+
export type DeliveredEvent<TPayload = unknown> = DiagnosticEvent<TPayload> & {
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
/** One unit of work: run listener `listenerId` for `envelope`. */
|
|
28
|
+
export interface ListenerDelivery {
|
|
29
|
+
/** Stable listener id, `<ClassName>#<method>`. The same in every process running the same app. */
|
|
30
|
+
listenerId: string;
|
|
31
|
+
/**
|
|
32
|
+
* The event, as emitted. `diag:<envelope.id>:<listenerId>` identifies this delivery uniquely:
|
|
33
|
+
* use it as the idempotency key.
|
|
34
|
+
*/
|
|
35
|
+
envelope: DeliveredEvent;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Run listener `listenerId` for `envelope` in this process. Resolves when the handler finishes;
|
|
39
|
+
* rejects with the handler's error (retry it), or with an `UnknownDiagnosticListenerError`
|
|
40
|
+
* (`code: 'E_UNKNOWN_DIAGNOSTICS_LISTENER'`) when this process has no listener with that id.
|
|
41
|
+
*/
|
|
42
|
+
export type ListenerInvoker = (listenerId: string, envelope: DiagnosticEvent) => Promise<void>;
|
|
43
|
+
/** What a delivering transport receives when diagnostics creates it at bootstrap. */
|
|
44
|
+
export interface DeliveryTransportContext {
|
|
45
|
+
/** The application's module ref, to resolve providers. */
|
|
46
|
+
moduleRef: ModuleRef;
|
|
47
|
+
/** Id of this process (`nodeId` in the diagnostics options, or a random one). */
|
|
48
|
+
nodeId: string;
|
|
49
|
+
/** Which half of a split deployment this process is. On `'api'`, never run deliveries here. */
|
|
50
|
+
role: DiagnosticsRole;
|
|
51
|
+
/** Runs a listener in this process. See {@link ListenerInvoker}. */
|
|
52
|
+
invoke: ListenerInvoker;
|
|
53
|
+
/** Ids of the listeners registered in this process. */
|
|
54
|
+
listenerIds: readonly string[];
|
|
55
|
+
}
|
|
56
|
+
/** A transport that owns listener execution (`queue`, `durable`). */
|
|
57
|
+
export interface ListenerDeliveryTransport {
|
|
58
|
+
/**
|
|
59
|
+
* Take ownership of these deliveries. Called only in the emitting process. Return (or resolve)
|
|
60
|
+
* once they are safely stored; a throw or rejection is logged and those deliveries are lost.
|
|
61
|
+
*/
|
|
62
|
+
deliver(deliveries: readonly ListenerDelivery[]): void | Promise<void>;
|
|
63
|
+
/** Release resources on shutdown. Awaited. */
|
|
64
|
+
stop?(): void | Promise<void>;
|
|
65
|
+
}
|
|
66
|
+
/** Options of `transports.durable()`, passed to the durable step that runs each listener. */
|
|
67
|
+
export interface DurableTransportConfig {
|
|
68
|
+
/** Max attempts of a listener before its run fails. */
|
|
69
|
+
retries?: number;
|
|
70
|
+
/** How the delay between attempts grows: constant (`fixed`) or doubling (`exp`). */
|
|
71
|
+
backoff?: 'fixed' | 'exp';
|
|
72
|
+
/** Base delay between attempts, in ms. */
|
|
73
|
+
backoffMs?: number;
|
|
74
|
+
/** Upper bound of the exponential delay, in ms. */
|
|
75
|
+
backoffMaxMs?: number;
|
|
76
|
+
/** Add random jitter to the delay. */
|
|
77
|
+
jitter?: boolean;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* What `@dudousxd/nestjs-durable-diagnostics/delivery` must export (as named exports) for
|
|
81
|
+
* `transports.durable()`. Diagnostics imports it only when durable is the selected transport.
|
|
82
|
+
*/
|
|
83
|
+
export interface DurableDiagnosticsDeliveryModule {
|
|
84
|
+
/**
|
|
85
|
+
* Whether durable is set up in this app (its engine resolves from `moduleRef`). Called at
|
|
86
|
+
* bootstrap, before {@link createDeliveryTransport}; `false` fails the bootstrap.
|
|
87
|
+
*/
|
|
88
|
+
isConfigured(moduleRef: ModuleRef): boolean | Promise<boolean>;
|
|
89
|
+
/** Create the delivering transport. Called once per process, at bootstrap. */
|
|
90
|
+
createDeliveryTransport(context: DeliveryTransportContext, config: DurableTransportConfig): ListenerDeliveryTransport | Promise<ListenerDeliveryTransport>;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=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AI,CAAC,CAAC;CAC/B;AAED,6FAA6F;AAC7F,MAAM,WAAW,sBAAsB;IACrC,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,OAAO,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC1B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAC/C;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/D,8EAA8E;IAC9E,uBAAuB,CACrB,OAAO,EAAE,wBAAwB,EACjC,MAAM,EAAE,sBAAsB,GAC7B,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;CACnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery.js","sourceRoot":"","sources":["../../src/nestjs/delivery.ts"],"names":[],"mappings":""}
|
|
@@ -1,20 +1,60 @@
|
|
|
1
1
|
import { type OnApplicationBootstrap, type OnApplicationShutdown } from '@nestjs/common';
|
|
2
|
-
import { DiscoveryService, MetadataScanner } from '@nestjs/core';
|
|
2
|
+
import { DiscoveryService, MetadataScanner, ModuleRef } from '@nestjs/core';
|
|
3
|
+
import type { ListenerInvoker } from './delivery.js';
|
|
4
|
+
import { type DiagnosticsModuleOptions } from './diagnostics.options.js';
|
|
5
|
+
import { type OnDiagnosticMeta } from './on-diagnostic.decorator.js';
|
|
6
|
+
/** Thrown by the listener invoker for a listener id this process does not know. */
|
|
7
|
+
export declare class UnknownDiagnosticListenerError extends Error {
|
|
8
|
+
readonly listenerId: string;
|
|
9
|
+
readonly code = "E_UNKNOWN_DIAGNOSTICS_LISTENER";
|
|
10
|
+
constructor(listenerId: string);
|
|
11
|
+
}
|
|
12
|
+
/** A discovered `@OnDiagnostic` method. */
|
|
13
|
+
export interface RegisteredListener {
|
|
14
|
+
/** Stable id, `<ClassName>#<method>`. */
|
|
15
|
+
readonly id: string;
|
|
16
|
+
/** Where it listens (one entry per stacked decorator). */
|
|
17
|
+
readonly matchers: readonly OnDiagnosticMeta[];
|
|
18
|
+
readonly instance: Record<string, unknown>;
|
|
19
|
+
readonly method: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Discovers `@OnDiagnostic` methods, starts the `default` transport and routes every matching
|
|
23
|
+
* event: to the delivering transport (only in the emitting process), or straight to the handler.
|
|
24
|
+
*/
|
|
3
25
|
export declare class DiagnosticsExplorer implements OnApplicationBootstrap, OnApplicationShutdown {
|
|
4
26
|
private readonly discovery;
|
|
5
27
|
private readonly scanner;
|
|
28
|
+
private readonly moduleRef;
|
|
6
29
|
private readonly logger;
|
|
7
|
-
private readonly
|
|
8
|
-
private readonly
|
|
30
|
+
private readonly listeners;
|
|
31
|
+
private readonly matchCache;
|
|
32
|
+
private readonly subscribed;
|
|
33
|
+
private readonly wildcardLibs;
|
|
34
|
+
private readonly pending;
|
|
35
|
+
private scheduled;
|
|
9
36
|
private offChannelRegistered;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
37
|
+
private transport;
|
|
38
|
+
private deliver;
|
|
39
|
+
private role;
|
|
40
|
+
private readonly options;
|
|
41
|
+
constructor(discovery: DiscoveryService, scanner: MetadataScanner, moduleRef: ModuleRef, options?: DiagnosticsModuleOptions);
|
|
42
|
+
/**
|
|
43
|
+
* Run listener `listenerId` for `envelope` in this process. The handler is called synchronously;
|
|
44
|
+
* the promise rejects with its error.
|
|
45
|
+
*/
|
|
46
|
+
readonly invoke: ListenerInvoker;
|
|
47
|
+
/** Every listener discovered in this process. */
|
|
48
|
+
registeredListeners(): RegisteredListener[];
|
|
49
|
+
onApplicationBootstrap(): Promise<void>;
|
|
50
|
+
onApplicationShutdown(): Promise<void>;
|
|
51
|
+
private discover;
|
|
52
|
+
/** The listeners that receive an event on `aviary:<lib>:<event>`. */
|
|
53
|
+
private listenersFor;
|
|
54
|
+
private subscribeListeners;
|
|
14
55
|
private subscribe;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
private logError;
|
|
56
|
+
private readonly onEvent;
|
|
57
|
+
/** Hand this turn's deliveries to the transport, in emit order. Settles once they are handed over. */
|
|
58
|
+
private flush;
|
|
19
59
|
}
|
|
20
60
|
//# sourceMappingURL=diagnostics.explorer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.explorer.d.ts","sourceRoot":"","sources":["../../src/nestjs/diagnostics.explorer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diagnostics.explorer.d.ts","sourceRoot":"","sources":["../../src/nestjs/diagnostics.explorer.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAE3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK5E,OAAO,KAAK,EAAoC,eAAe,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC9F,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAIzF,mFAAmF;AACnF,qBAAa,8BAA+B,SAAQ,KAAK;IAE3C,QAAQ,CAAC,UAAU,EAAE,MAAM;IADvC,QAAQ,CAAC,IAAI,oCAAoC;gBAC5B,UAAU,EAAE,MAAM;CAKxC;AAED,2CAA2C;AAC3C,MAAM,WAAW,kBAAkB;IACjC,yCAAyC;IACzC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,QAAQ,CAAC,QAAQ,EAAE,SA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