Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(auto-instrumentations-node)!: disable @opentelemetry/instrumentation-fastify by default #2652

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

pichlermarc
Copy link
Member

Which problem is this PR solving?

See #2647 - there is now an official instrumentation for fastify that 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-fastify into a default-disabled state.

This PR disables the instrumentation by default.

Temporary Workaround until full removal on March 25, 2025

Important

The below is a temporary workaround for users that want to update, but for whom the disabled @opentelemetry/instrumetnation-fastify is a blocker. Starting March 25, 2025, we will drop @opentelemetry/instrumentation-fastify and you will not be able to enable it like this anymore.

If you use this workaround, we therefore recommend that you migrate to @fastify/otel as 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-fastify until it is removed by adding fastify to the comma seperated list in OTEL_NODE_ENABLED_INSTRUMENTATIONS.

If you're using @opentelemetry/auto-instrumentations-node/register without OTEL_NODE_ENABLED_INSTRUMENTATIONS set previously

  • set OTEL_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-router

If you're using getAutoInstrumentationsNode() without an options object that contains @opentelemetry/fastify and without OTEL_NODE_ENABLED_INSTRUMENTATIONS set previously

  • set OTEL_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-router

If you're using getAutoInstrumentationsNode() but you don't want to use environment variables

  • change the code to
      getNodeAutoInstrumentations({
        '@opentelemetry/instrumentation-fastify': {
          enabled: true,
        },
      }),

@pichlermarc pichlermarc added pkg:auto-instrumentations-node pkg:instrumentation-fastify has:sponsor This package or feature has a sponsor that has volunteered to review PRs and respond to questions labels Jan 16, 2025
@pichlermarc pichlermarc requested a review from a team as a code owner January 16, 2025 16:18
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.79%. Comparing base (e57f3e4) to head (ae3ddef).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2652   +/-   ##
=======================================
  Coverage   90.79%   90.79%           
=======================================
  Files         169      169           
  Lines        8061     8061           
  Branches     1646     1646           
=======================================
  Hits         7319     7319           
  Misses        742      742           
Files with missing lines Coverage Δ
...tapackages/auto-instrumentations-node/src/utils.ts 98.23% <100.00%> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has:sponsor This package or feature has a sponsor that has volunteered to review PRs and respond to questions pkg:auto-instrumentations-node pkg:instrumentation-fastify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants