feat(auto-instrumentations-node)!: disable @opentelemetry/instrumentation-fastify by default #2652
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
See #2647 - there is now an official instrumentation for
fastifythat is maintained by the Fastify authors. As such we'll be retiring the instrumentation package in favor of the official instrumentation. This PR drops@opentelemetry/instrumentation-fastifyinto a default-disabled state.This PR disables the instrumentation by default.
Temporary Workaround until full removal on June 30, 2025 (updated, see this comment and below)
Important
The below is a temporary workaround for users that want to update, but for whom the disabled
@opentelemetry/instrumetnation-fastifyis a blocker. Starting June 30, 2025, we will drop@opentelemetry/instrumentation-fastifyand you will not be able to enable it like this anymore.If you use this workaround, we therefore recommend that you migrate to
@fastify/otelas soon as possible. Click here to learn how to use the new, official instrumentation package. You can stop using this workaround once you have migrated.You can still enable
@opentelemetry/instrumentation-fastifyuntil it is removed by addingfastifyto the comma seperated list inOTEL_NODE_ENABLED_INSTRUMENTATIONS.If you're using
@opentelemetry/auto-instrumentations-node/registerwithoutOTEL_NODE_ENABLED_INSTRUMENTATIONSset previouslyOTEL_NODE_ENABLED_INSTRUMENTATIONS=amqplib,aws-lambda,aws-sdk,bunyan,cassandra-driver,connect,cucumber,dataloader,dns,express,fastify,pool,graphql,grpc,hapi,http,ioredis,kafkajs,knex,koa,memoizer,memcached,instrumentation-mongodb,instrumentation-mongoose,instrumentation-mysql2,instrumentation-mysql,instrumentation-nestjs-core,instrumentation-net,instrumentation-pg,instrumentation-pino,instrumentation-redis,instrumentation-redis-4,instrumentation-restify,instrumentation-routerIf you're using
getAutoInstrumentationsNode()without an options object that contains@opentelemetry/fastifyand withoutOTEL_NODE_ENABLED_INSTRUMENTATIONSset previouslyOTEL_NODE_ENABLED_INSTRUMENTATIONS=amqplib,aws-lambda,aws-sdk,bunyan,cassandra-driver,connect,cucumber,dataloader,dns,express,fastify,pool,graphql,grpc,hapi,http,ioredis,kafkajs,knex,koa,memoizer,memcached,instrumentation-mongodb,instrumentation-mongoose,instrumentation-mysql2,instrumentation-mysql,instrumentation-nestjs-core,instrumentation-net,instrumentation-pg,instrumentation-pino,instrumentation-redis,instrumentation-redis-4,instrumentation-restify,instrumentation-routerIf you're using
getAutoInstrumentationsNode()but you don't want to use environment variables