@dudousxd/nestjs-diagnostics
Version:
A standard convention for @dudousxd/nestjs-* libs to emit observability events over node:diagnostics_channel.
18 lines • 846 B
TypeScript
/** Metadata key under which a method's @OnDiagnostic subscriptions accumulate. */
export declare const ON_DIAGNOSTIC_META: unique symbol;
/** One subscription declared on a method. `event` omitted = every event of `lib`. */
export interface OnDiagnosticMeta {
lib: string;
event?: string;
}
/**
* Subscribe a provider method to a diagnostics channel. Requires
* `DiagnosticsModule.forRoot()` to be imported so the explorer wires it up.
*
* - `@OnDiagnostic('resilience', 'circuit-opened')` — the exact channel.
* - `@OnDiagnostic('resilience')` — every `aviary:resilience:*` channel (current + future).
*
* Stackable: apply more than once to react to several channels with one method.
*/
export declare function OnDiagnostic(lib: string, event?: string): MethodDecorator;
//# sourceMappingURL=on-diagnostic.decorator.d.ts.map