Skip to content

Commit

Permalink
feat(auto-instrumentations-node)!: disable @opentelemetry/instrumenta…
Browse files Browse the repository at this point in the history
…tion-fastify by default (#2652)
  • Loading branch information
pichlermarc authored Jan 27, 2025
1 parent 4f1e605 commit 45c55a6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion metapackages/auto-instrumentations-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ registerInstrumentations({
- [@opentelemetry/instrumentation-dataloader](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-dataloader)
- [@opentelemetry/instrumentation-dns](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-dns)
- [@opentelemetry/instrumentation-express](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-express)
- [@opentelemetry/instrumentation-fastify](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-fastify)
- [@opentelemetry/instrumentation-fastify](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-fastify) (deprecated, default disabled)
- This component is **deprecated** in favor of the official instrumentation package [`@fastify/otel`](https://www.npmjs.com/package/@fastify/otel), maintained by the Fastify authors.
- Please see [here](https://github.com/fastify/otel?tab=readme-ov-file#usage) for instructions on how to use `@fastify/otel`.
- This component will be removed on June 30, 2025
- [@opentelemetry/instrumentation-fs](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-fs) (default disabled)
- [@opentelemetry/instrumentation-generic-pool](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-generic-pool)
- [@opentelemetry/instrumentation-graphql](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-graphql)
Expand Down
5 changes: 4 additions & 1 deletion metapackages/auto-instrumentations-node/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ const InstrumentationMap = {
'@opentelemetry/instrumentation-winston': WinstonInstrumentation,
};

const defaultExcludedInstrumentations = ['@opentelemetry/instrumentation-fs'];
const defaultExcludedInstrumentations = [
'@opentelemetry/instrumentation-fs',
'@opentelemetry/instrumentation-fastify',
];

// Config types inferred automatically from the first argument of the constructor
type ConfigArg<T> = T extends new (...args: infer U) => unknown ? U[0] : never;
Expand Down
3 changes: 2 additions & 1 deletion metapackages/auto-instrumentations-node/test/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ describe('utils', () => {
).filter(depName => {
return (
depName.startsWith('@opentelemetry/instrumentation-') &&
depName !== '@opentelemetry/instrumentation-fs'
depName !== '@opentelemetry/instrumentation-fs' &&
depName !== '@opentelemetry/instrumentation-fastify'
);
});

Expand Down

0 comments on commit 45c55a6

Please sign in to comment.