@appsignal/nodejs
3.9.5 · 11 Nov 2026MIT24.2k / weekRepositoryHomepagenpmAtom feed
In short
3 fixed2 changed
Release note
Changed
Patch - Do not restore closed spans from within the
withSpanhelper. If a previously active span gets closed whilewithSpanhas another span as currently active, do not restore the closed span when the callback has finished.Patch - Do not restore root span after
withSpancallback has finished. Previously the root span was restored to the original root span before thewithSpanhelper was called. This has been changed, because thewithSpanhelper is only about changing the active span, not the root span. If a new root span has been set within awithSpanhelper callback, the root span will no longer be restored. We recommend setting a new root span before callingwithSpaninstead.const rootSpan = tracer.rootSpan() const span = tracer.createSpan(...) tracer.withSpan(span, function(span) { tracer.createRootSpan(...) }); // No longer match rootSpan != tracer.rootSpan()
Fixed
Patch - Only allow open root spans to be set as root. This avoids closed root spans to be reused in child contexts.
Patch - Don't return closed spans in
withSpanhelper. If a closed span was given to thewitSpanhelper it would temporarily overwrite the context with a closed span that cannot be modified. Instead it will return the current active span, if any. If no span was active it will return aNoopSpan.Patch - Add
@opentelemetry/sdk-trace-basepackage runtime dependency. Our OpenTelemetry SpanProcessor needs this package at runtime, not just at compile time.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.