@appsignal/nodejs
3.9.5 · 11 Nov 2026MIT24.2k / weekRepositoryHomepagenpmAtom feed
Upgrading @appsignal/nodejs From 2.3.1 to 2.4.2
8 releases in betweenevery note read
Reading releases, release notes and advisories…
- 3
- changes to make
- 0
- advisories fixed
- 5
- new
- 15
- fixes
Before you upgrade
Tick each one off as you go- Breaking2.3.2
- Breaking2.3.2
- Breaking2.3.2
Release by release
- Fixed
Patch - Only allow open root spans to be set as root. This avoids closed root spans to be reused in child contexts.
- Fixed
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. - Fixed
Patch - Add
@opentelemetry/sdk-trace-basepackage runtime dependency. Our OpenTelemetry SpanProcessor needs this package at runtime, not just at compile time.
- Fixed
- Fixed
Patch - Do not instrument HTTP requests to the default socket.io path. This works around an issue where our HTTP instrumentation breaks socket.io's server side, causing the client side to get stuck in a connection loop.
- Fixed
Patch - Fix removing event listeners from wrapped event emitters. When using
tracer.wrapEmitterto wrap an event emitter, it was not possible to remove any listeners that were added after the event emitter was wrapped.
- Fixed
- New
Minor - Add OpenTelemetry span processor for the mysql and mysql2 packages. These are experimental integrations and require additional set up to integrate with OpenTelemetry.
- New
Patch - Add config options for disabling default instrumentation like HTTP, HTTPS, PostgreSQL (pg package) and Redis (node-redis package).
- New
Patch - Add OpenTelemetry node-redis and ioredis query sanitizers. We recommend using these sanitizers to ensure no sensitive data is sent in query statements. Add the sanitizer to the
dbStatementSerializerconfig as demonstrated below. - Fixed
Patch - Fix the
ScopeManager.active()function returning closed spans. - Fixed
Patch - Do not transfer closed spans for new async contexts in the ScopeManager. Rather than relying on
ScopeManager.active()andScopeManager.root()to make sure the span is not already closed, also make sure it's not closed when transferring spans around between async contexts.
- New
- New
Patch - Add the
createRootSpanfunction to the Tracer to allow explicit creation of RootSpans even if another RootSpan already exists and is tracked as the current RootSpan. Make sure to not forget about the previous RootSpan, and close it as well at some point when using this function.
- New
- Fixed
Patch - When instrumenting an outgoing HTTP request, read the
hostproperty from the request options if thehostnameproperty is not present. This fixes a bug where outgoing HTTP request hosts would be shown ashttp://localhost. - Fixed
Patch - Fix error on Microsoft Windows machines on install. The AppSignal extension still won't install on Windows, but now it won't cause an error while checking a development mode condition if it should build the TypeScript package.
- Fixed
- Fixed
Patch - Ensure the root span is preserved across scopes. Due to a bug in the scope management logic, calling
tracer.withSpancould cause the root span for a given scope to be forgotten.
- Fixed
- New
Patch - Log messages are now sent through a new centralized logger that writes to
/tmp/appsignal.logby default. A warning is printed to STDERR when the default or provided logPath is not accessible, and the Logger automatically falls back to STDOUT. Use config optionlog: stdoutto log AppSignal messages to STDOUT instead. - Fixed
Patch - Allow nested values in
Span.setSampleData. This change also allows values other than strings, integers and booleans to be passed as values within the sample data objects. Note that not all sample data keys allow nested values to be passed. - Fixed
Patch - Follow redirects when downloading the AppSignal agent. This fixes an issue where the redirect page would be downloaded instead of the agent, causing the agent installation to fail.
- Fixed
Patch - Fix an issue where the AppSignal extension would throw an error when an object containing a non-integer number is sent to it. This would be triggered when calling
setSampleDatawith an object containing a non-integer number, or when the values for a metric's tags are non-integer numbers.
- New
- Breaking
Patch - Remove the private function
Span.toJSON. This wasn't previously marked as private, but it was. - Breaking
Patch - Do not ship the extension install script test files in the published package. Reduces the package size a tiny bit.
- Breaking
Patch - Remove the unused experimental module.
- Fixed
Patch - Show errors in loading the extension when the
@appsignal/nodejsmodule is required. - Fixed
Patch - The minutely probes are now stopped when
Appsignal.stop()is called. This fixes an issue where Jest tests would warn about asynchronous operations that remain pending after the tests.
- Breaking
10 other lines we could not sort, mostly version bumps
- 2.4.2
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. - 2.4.2
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. - 2.4.0
Patch - Use the OpenTelemetry SpanProcessor interface to build our own SpanProcessor. We previously copied the SpanProcessor code into our package, but instead we now use the OpenTelemetry interface directly. This should make our processor match the expected type better.
- 2.4.0
Patch - Bump agent to v-0b43802.
- 2.3.5
Patch - Use the Node.js performance module as high-resolution timer for span creation and close times. This provides more accurate times and improves compatibility with other systems in the future.
- 2.3.4
Patch - Update node-gyp to major version
9.0.0. This drops compatibility with Python 2.7 for the extension install, but it makes it compatible with the latest Python 3 version, which should be more accessible to users going forward. - 2.3.3
Patch - Bump agent to v-bbc830a
- 2.3.2
Patch - Update the expected Span type in ScopeManager to
Spanfrom the@appsignal/nodejspackage, rather than theNodeSpanfrom the@appsignal/typespackage. The type definition is the same, but now all Span types used by the Node.js integration are defined in the@appsigna/nodejspackage. - 2.3.2
Patch - Improve memory usage when extension is not initialized. It will no longer initialize a new empty Tracer object when the extension is not loaded or AppSignal is not active.
- 2.3.2
Patch - Update @appsignal/types dependency to 3.0.0.
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.