unstale

npm / @nestjs/observe

@nestjs/observe

What changed in @nestjs/observe 0.1 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

8 breaking17 security1 deprecations27 new APIs and options5 performance52 behavior and defaults1 tooling75 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@nestjs/observe 125 changes

Deprecations 1

  • The timeout option of built-in database, microservice, and gRPC indicators is deprecated; use .withTimeout() on the returned attempt instead.

    12.0.0upgrade guide

New APIs and options 4

  • Creates the observability module and instrumentation provider used to configure the SDK.

    12.0.0upgrade guide

  • The application option connects Nest's request lifecycle to the SDK's instrumentation.

    12.0.0upgrade guide

  • Adds an official SDK for opt-in, Nest-native observability that reports requests, jobs, errors, and traces in terms of Nest components.

    12.0.0upgrade guide

  • Configures the observability module with a service identifier.

    12.0.0upgrade guide

@nestjs/observe 0.3158 changes

Breaking changes 8

  • Caught and answered database errors remain on the query span and lift to the HTTP request only when it ends in a 5xx.

    0.3.26release notes

  • The command stops with an error for a key pair outside the expected format or when the project's .env is tracked by git.

    0.3.26release notes

  • Response hooks end the trace of the request or message they receive regardless of the async context in which they run.

    0.3.26release notes

  • Work left running by an operation stops carrying its trace id 10 seconds after the operation ends, including in request IDs, logs, packets and jobs.

    0.3.26release notes

  • A message trace is dropped rather than held when its client disconnects before the handler settles.

    0.3.26release notes

  • CORS preflights are skipped unless http.tracePreflights is on.

    0.3.8release notes

  • Recorded inline numbers now appear as underscores, so existing groupings for affected queries shift once.

    0.3.0release notes

  • When sourceContext is enabled, an error whose message is reassigned after construction no longer gets code frames.

    0.3.0release notes

Security 14

  • Credentials are masked more thoroughly in recorded URLs, headers, log lines, error messages and code frames; free text uses the same sensitive-key names as attributes.

    0.3.26release notes

  • The link command opens only http(s) link pages and writes only inside the project directory.

    0.3.26release notes

  • The JWT redaction rule is now linear and also applies to error messages and request bodies captured with http.capture.body.

    0.3.11release notes

  • Outbound calls made with fetch are recorded as spans, with sensitive query parameters masked.

    0.3.0release notes

  • Captures request inputs only when a request fails or exceeds slowerThanMs; by default, it records a short safe-header allow-list and no body, and redacts everything recorded.

    0.3.0release notes

  • Outbound calls made with https are recorded as spans, with sensitive query parameters masked.

    0.3.0release notes

  • Outbound calls made with node:http are recorded as spans, with sensitive query parameters masked.

    0.3.0release notes

  • Credential key names are matched by suffix and masked in URLs, log attributes, and captured headers and bodies.

    0.3.0release notes

  • Stack frames are read only from lines following the error's own message, preventing a message containing a forged frame-shaped line from selecting an application source file.

    0.3.0release notes

  • Code-frame lines are redacted before they are sent.

    0.3.0release notes

  • Frame parsing uses a linear parser and caps line length and frame count to prevent event-loop blocking on crafted lines.

    0.3.0release notes

  • Symlinks are resolved before the containment check, preventing a symlink under the app root from directing the reader outside it.

    0.3.0release notes

  • Outbound calls made with undici are recorded as spans, with sensitive query parameters masked.

    0.3.0release notes

  • More URL parameters are masked, including keys ending in token, secret, signature, and similar suffixes; this can include pagination parameters such as pageToken.

    0.3.0release notes

New APIs and options 22

  • Every job run gets a trace of its own.

    0.3.26release notes

  • Traces can be exported as OpenTelemetry spans over OTLP.

    0.3.23release notes

  • When opted in, carries W3C traceparent and follows an OpenTelemetry SDK.

    0.3.22release notes

  • Adds a terminal command to link a project.

    0.3.15release notes

  • Custom request operation ids are supported.

    0.3.13release notes

  • An enabled option can switch the agent off.

    0.3.13release notes

  • Database queries for MSSQL (SQL Server) can be instrumented.

    0.3.13release notes

  • The collector is told which ingest modes the agent can read.

    0.3.12release notes

  • An objective decorator lets developers declare SLOs in code.

    0.3.4release notes

  • Configure matching requests by status code or a per-operation function to omit their span trees while still reporting the request and its error.

    0.3.3release notes

  • Adds the jobs.ignore option to skip tracing job runs.

    0.3.2release notes

  • A new ws option, getUserId, is available.

    0.3.0release notes

  • Setting body: true adds the request body to captures, capped at 2 KB and configurable up to 16 KB.

    0.3.0release notes

  • Setting capture: false turns request capture off.

    0.3.0release notes

  • Sets the slowness threshold for capturing request inputs; ordinary traffic is never recorded.

    0.3.0release notes

  • A new ws option, ignore, is available.

    0.3.0release notes

  • Legacy Bull is now supported alongside BullMQ as an optional peer.

    0.3.0release notes

  • Query and outbound-HTTP spans can be disabled with outgoing: false.

    0.3.0release notes

  • The database side of outgoing spans can be disabled independently with outgoing: { database: false }.

    0.3.0release notes

  • The HTTP side of outgoing spans can be disabled independently with outgoing: { http: false }.

    0.3.0release notes

  • A new ws option, setAttributes, is available.

    0.3.0release notes

  • A new ws option, tags, is available.

    0.3.0release notes

Performance 4

  • The agent's per-span cost is reduced, and its overhead is published.

    0.3.21release notes

  • Parsing forwarded log lines now takes linear time regardless of input, avoiding event-loop delays from long runs of whitespace.

    0.3.11release notes

  • Nest's Reflector is no longer instrumented, avoiding spans from repeated metadata lookups that added no insight.

    0.3.11release notes

  • The source-map cache is now bounded.

    0.3.0release notes

Behavior and default changes 48

  • An aborted request's trace is dropped as soon as the response closes on every adapter.

    0.3.26release notes

  • At most 1,000 custom metrics are reported; summaries without labels are capped at 1,000, and non-finite values or unkeyable label values are ignored.

    0.3.26release notes

  • Errors raised while parsing, validating or coercing request input are recorded by error class and code.

    0.3.26release notes

  • The processing start hook runs done synchronously.

    0.3.26release notes

  • A string entry matches the request path with or without a query string.

    0.3.26release notes

  • Microservice messages are named by the route they reached.

    0.3.26release notes

  • The agent shares Nest request, processing and dispatch hook slots with application hooks instead of replacing them; BullMQ processor-decorator overrides are kept.

    0.3.26release notes

  • Collector and OTLP replies are read up to 64 KiB.

    0.3.26release notes

  • The OTLP timeout covers the whole export.

    0.3.26release notes

  • An operation records at most 10,000 spans; later calls run untraced and are counted in an observe.unrecordedSpans tag.

    0.3.26release notes

  • Spans nest at most 256 levels deep.

    0.3.26release notes

  • The forwarder sends at most 50 entries per write, cuts lines at 8 kB and redacts the lines of a multi-line message together.

    0.3.26release notes

  • The first 20 captured errors in a trace retain details; later errors mark their span as failed. Error messages and stacks are limited to 4 kB and 8 kB.

    0.3.26release notes

  • Calling captureError outside a traced context warns once instead of throwing.

    0.3.26release notes

  • Stops tracing the internals of Nest's ConfigService.

    0.3.25release notes

  • Stops tracing the internals of Nest's validation pipes.

    0.3.25release notes

  • OpenTelemetry interop remains enabled through collector outages.

    0.3.23release notes

  • OpenTelemetry traces are carried into jobs and microservice messages, allowing trace context to follow work across these boundaries.

    0.3.23release notes

  • Outbound model-provider calls now report model and token usage.

    0.3.20release notes

  • The MongoDB driver's client and database handles are no longer instrumented.

    0.3.20release notes

  • The agent's version is now sent.

    0.3.19release notes

  • Any attribute key is accepted by default.

    0.3.18release notes

  • Store types are now interfaces.

    0.3.18release notes

  • The type is now optional because the environment fills it.

    0.3.16release notes

  • Linking now installs and wires the SDK in apps that do not use it yet.

    0.3.16release notes

  • While an account's overage is paused, only server errors are sent.

    0.3.13release notes

  • Rejected credentials are no longer retried on every flush.

    0.3.12release notes

  • Forwarded log metadata is constrained to collector limits: context is redacted and capped at 255 characters, trace ids are validated, and levels are mapped to Nest's.

    0.3.11release notes

  • JSON logs from winston, pino and similar loggers map info, warning and trace to Nest levels; other levels are kept as attributes.level.

    0.3.11release notes

  • The collector connection stays open between flushes.

    0.3.8release notes

  • Long class names are cut to fit the collector.

    0.3.6release notes

  • Stalls are recorded alongside a runtime sample in the event loop delay.

    0.3.6release notes

  • Event loop delay, utilisation, and GC kinds are reported per window.

    0.3.6release notes

  • Long method names are cut to fit the collector.

    0.3.6release notes

  • The service version is inferred from the deploy environment.

    0.3.4release notes

  • Jobs added with QueuePro.add carry the trace id of the request that enqueued them, so they show up as one trace.

    0.3.3release notes

  • Jobs added with QueuePro.addBulk carry the trace id of the request that enqueued them, so they show up as one trace.

    0.3.3release notes

  • This package is now an optional peer dependency for BullMQ Pro tracing.

    0.3.3release notes

  • Jobs run by BullMQ Pro WorkerPro are now traced.

    0.3.3release notes

  • A BullMQ job enqueued while handling a request carries that request's trace id; repeatable jobs start their own trace.

    0.3.0release notes

  • Inline GraphQL number literals are blanked in recorded documents, so queries differing only in those numbers group as one shape.

    0.3.0release notes

  • Queries through mongodb are recorded as spans under the provider method, with verb-and-table names and statements stripped of literals; bound parameters are never read.

    0.3.0release notes

  • Queries through mysql2 are recorded as spans under the provider method, with verb-and-table names and statements stripped of literals; bound parameters are never read.

    0.3.0release notes

  • @nestjs/websockets is an optional peer.

    0.3.0release notes

  • Queries through pg are recorded as spans under the provider method, with verb-and-table names and statements stripped of literals; bound parameters are never read.

    0.3.0release notes

  • Custom redaction keys now also apply to URL query strings.

    0.3.0release notes

  • Each message handled by a decorated method is reported as an operation named GatewayClass:pattern on both ws and socket.io adapters.

    0.3.0release notes

  • The current trace id is forwarded to outbound services and adopted from microservice packet metadata; a header set by the application is not overwritten, and packet values are validated like HTTP headers.

    0.3.0release notes

Tooling 1

  • The CLI tells coding agents where the app's production data is.

    0.3.18release notes

Fixes and other changes 61

  • Callback-style Bull processors settle through done.

    0.3.26release notes

  • Processors keep their arity so a processor that takes an abort signal can be cancelled.

    0.3.26release notes

  • Replies to ClientProxy and ClientGrpc calls arrive in the caller's context.

    0.3.26release notes

  • A batch too large to send whole is sent without its largest entries rather than dropped.

    0.3.26release notes

  • mysql2 callbacks run in their caller's context.

    0.3.26release notes

  • pg callbacks run in their caller's context.

    0.3.26release notes

  • SQL statements are read more accurately for MySQL, Postgres and MSSQL before they are recorded.

    0.3.26release notes

  • A traced method's promise is returned exactly as the method returned it, unless the method is async.

    0.3.26release notes

  • Queued undici requests run in their caller's context.

    0.3.26release notes

  • Handlers behind interceptors are traced again inside their message's context, allowing TracerService to work there.

    0.3.26release notes

  • Reads the code frames of an error whose name contains its message.

    0.3.25release notes

  • Opens a series when a labelled gauge is set to a value.

    0.3.25release notes

  • Keeps a metric working when it is fetched again with an initial value.

    0.3.25release notes

  • Places exported jobs and messages under the span that sent them.

    0.3.25release notes

  • Interop works from start-up, and jobs run under bullmq-otel's span.

    0.3.24release notes

  • ioredis clients' spans are labeled after redis and cluster.

    0.3.24release notes

  • The ONLY keyword is ignored when extracting table names.

    0.3.23release notes

  • A traced preflight that recorded no spans is now reported.

    0.3.23release notes

  • Trace messages name the trace ID rather than the registry key.

    0.3.22release notes

  • Releases after 0.3.20 are licensed for the hosted service only.

    0.3.21release notes

  • RPC and HTTP executions that share a trace ID are isolated.

    0.3.21release notes

  • Guards deferred trace completion callbacks.

    0.3.19release notes

  • Ignore regex matching is now deterministic.

    0.3.19release notes

  • Guards option callbacks that run before the handler, preventing premature callback execution from causing problems.

    0.3.19release notes

  • The variables production needs are now named.

    0.3.19release notes

  • Finished spans are shipped when a span outlives its trace.

    0.3.18release notes

  • The response hook calls done so Fastify runs later hooks.

    0.3.17release notes

  • A span that outlives its trace now triggers a warning rather than an error.

    0.3.17release notes

  • The collector says once that it accepted the first batch.

    0.3.14release notes

  • Driver copies nested in Prisma's pg adapter and other dependents are patched.

    0.3.13release notes

  • A paced Free day is distinguished from a spent allowance.

    0.3.12release notes

  • When the collector rejects a batch for an invalid or oversized value, the agent removes just that value or entry and resends the rest instead of dropping the batch.

    0.3.11release notes

  • The JWT rule no longer matches a token directly preceded by a hyphen; the token= and Bearer rules are unchanged.

    0.3.11release notes

  • maxTracesPerBatch is capped at 5000, the collector's maximum accepted batch size.

    0.3.11release notes

  • The notice now states what data is still kept, and a new notice covers trimmed traces on paid plans.

    0.3.11release notes

  • A trace id is read from a log line only if it matches [A-Za-z0-9._:-]{1,128}; otherwise the line uses the trace id of its request.

    0.3.11release notes

  • Forwarded VERBOSE lines now carry their level and context.

    0.3.11release notes

  • Buffered telemetry is flushed before the worker shuts down.

    0.3.10release notes

  • Trace arrays are preserved during degraded ingestion.

    0.3.10release notes

  • Instances without a constructor continue to work.

    0.3.9release notes

  • Instrumented methods return the original promise.

    0.3.9release notes

  • Async hooks symbols are ignored when distinguishing a plain promise, improving promise detection.

    0.3.9release notes

  • Plain promises are chained so a dropped rejection still surfaces.

    0.3.9release notes

  • The URL fallback operation ID now uses its route path.

    0.3.8release notes

  • Placeholder keys now link to the demo instead of returning a 401.

    0.3.7release notes

  • Long custom metric descriptions are cut to fit the collector.

    0.3.6release notes

  • Custom metric label combinations rejected by the collector are refused.

    0.3.6release notes

  • Long custom metric labels are cut to fit the collector.

    0.3.6release notes

  • Long custom metric names are cut to fit the collector.

    0.3.6release notes

  • Applications on Nest versions before 11.1.4 can start with HTTP untraced.

    0.3.6release notes

  • The wire contract declares metric readings as they are sent.

    0.3.6release notes

  • Non-finite metric values are ignored instead of being recorded or causing an error.

    0.3.6release notes

  • A long service id is cut to the length accepted by the collector.

    0.3.6release notes

  • Long span names are cut to fit the collector.

    0.3.6release notes

  • Constructors held in provider fields are left untraced.

    0.3.5release notes

  • Named service versions are cut to the length accepted by the collector.

    0.3.5release notes

  • Wrapped @nestjs/bullmq processors now receive the lock token and abort signal passed by BullMQ after the job.

    0.3.3release notes

  • On the specified RabbitMQ, TCP, NATS, Redis and MQTT versions, handler rejections reach Nest's error logging instead of going unhandled.

    0.3.3release notes

  • Failing Kafka handlers now retain their partition and retry according to kafkajs retry options, matching behavior without the agent.

    0.3.3release notes

  • Fixed the logger patcher.

    0.3.1release notes

  • Fixed the stdout forwarder.

    0.3.1release notes

@nestjs/observe 0.27 changes

Security 2

Performance 1

  • Collapses n+1 and parallel executions of the same spans.

    0.2.0release notes

Behavior and default changes 1

  • Worker failures are classified by where they are thrown.

    0.2.3release notes

Fixes and other changes 3

  • The flush interval floor is honored when arming the timer.

    0.2.3release notes

  • Stops respawning the worker on shutdown.

    0.2.2release notes

  • Stops sending spans that the collector has said it is discarding.

    0.2.1release notes

@nestjs/observe 0.116 changes

Security 1

New APIs and options 1

Behavior and default changes 3

Fixes and other changes 11

  • Wrappers keep the original method arity.

    0.1.9release notes

  • Adds support for NestJS v12, allowing developers to use @nestjs/observe with that NestJS version.

    0.1.8release notes

  • Fixed a breakage involving internal slots.

    0.1.7release notes

  • The package now attempts to sanitize broken entries.

    0.1.6release notes

  • Fixed an issue involving skipping the instrumentation hook.

    0.1.4release notes

  • Fixed an issue involving private fields.

    0.1.4release notes

  • Fixed broken spans.

    0.1.4release notes

  • Manual spans now have the completed-caller tolerance that auto spans have.

    0.1.3release notes

  • Optional peers are loaded only when present, including @nestjs/microservices and @nestjs/bullmq.

    0.1.3release notes

  • A span starting under an already completed caller no longer crashes.

    0.1.3release notes

  • Fixes CommonJS compatibility.

    0.1.1release notes