@appsignal/nodejs
3.9.5 · 11 Nov 2026MIT24.2k / weekRepositoryHomepagenpmAtom feed
2.4.2 is the newest release of 2.x.
In short
3 new2 fixed2 changed
Release note
Added
Minor - Add OpenTelemetry span processor for the mysql and mysql2 packages. These are experimental integrations and require additional set up to integrate with OpenTelemetry.
Patch - Add config options for disabling default instrumentation like HTTP, HTTPS, PostgreSQL (pg package) and Redis (node-redis package).
The following configuration options have been added:
instrumentHttpinstrumentPginstrumentRedis
By default these configuration options are set to
true, which means the instrumentation is active by default. If you want to disable one of these instrumentations, configure it by setting the configuration option tofalse.// appsignal.js // Brief example, see our docs for a full example const appsignal = new Appsignal({ instrumentRedis: false // Disables the node-redis package instrumentation });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.// tracing.js // Add the RedisDbStatementSerializer import const { RedisDbStatementSerializer } = require("@appsignal/nodejs"); const { RedisInstrumentation } = require("@opentelemetry/instrumentation-redis"); const sdk = new opentelemetry.NodeSDK({ instrumentations: [ new RedisInstrumentation({ // Configure the AppSignal RedisDbStatementSerializer to sanitize queries dbStatementSerializer: RedisDbStatementSerializer }) ] });The same can be done for the ioredis instrumentation:
// tracing.js // Add the IORedisDbStatementSerializer import const { IORedisDbStatementSerializer } = require('@appsignal/nodejs'); const { IORedisInstrumentation } = require('@opentelemetry/instrumentation-ioredis'); const sdk = new opentelemetry.NodeSDK({ instrumentations: [ // Add the IORedisInstrumentation new IORedisInstrumentation({ // Configure the AppSignal IORedisDbStatementSerializer to sanitize queries dbStatementSerializer: IORedisDbStatementSerializer }) ] });
Changed
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.
Patch - Bump agent to v-0b43802.
Add redis and ioredis OpenTelemetry instrumentation support.
Patch - Bump agent to v-1a8ac46
Support OpenTelemetry root span import.
Support OpenTelemetry HTTP instrumentation.
Support OpenTelemetry Express instrumentation.
Fixed
Patch - Fix the
ScopeManager.active()function returning closed spans.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.
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.