Skip to content

Commit 45c55a6

Browse files
authored
feat(auto-instrumentations-node)!: disable @opentelemetry/instrumentation-fastify by default (#2652)
1 parent 4f1e605 commit 45c55a6

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

metapackages/auto-instrumentations-node/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,10 @@ registerInstrumentations({
171171
- [@opentelemetry/instrumentation-dataloader](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-dataloader)
172172
- [@opentelemetry/instrumentation-dns](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-dns)
173173
- [@opentelemetry/instrumentation-express](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-express)
174-
- [@opentelemetry/instrumentation-fastify](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-fastify)
174+
- [@opentelemetry/instrumentation-fastify](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-fastify) (deprecated, default disabled)
175+
- 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.
176+
- Please see [here](https://github.com/fastify/otel?tab=readme-ov-file#usage) for instructions on how to use `@fastify/otel`.
177+
- This component will be removed on June 30, 2025
175178
- [@opentelemetry/instrumentation-fs](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-fs) (default disabled)
176179
- [@opentelemetry/instrumentation-generic-pool](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-generic-pool)
177180
- [@opentelemetry/instrumentation-graphql](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-graphql)

metapackages/auto-instrumentations-node/src/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ const InstrumentationMap = {
136136
'@opentelemetry/instrumentation-winston': WinstonInstrumentation,
137137
};
138138

139-
const defaultExcludedInstrumentations = ['@opentelemetry/instrumentation-fs'];
139+
const defaultExcludedInstrumentations = [
140+
'@opentelemetry/instrumentation-fs',
141+
'@opentelemetry/instrumentation-fastify',
142+
];
140143

141144
// Config types inferred automatically from the first argument of the constructor
142145
type ConfigArg<T> = T extends new (...args: infer U) => unknown ? U[0] : never;

metapackages/auto-instrumentations-node/test/utils.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ describe('utils', () => {
3030
).filter(depName => {
3131
return (
3232
depName.startsWith('@opentelemetry/instrumentation-') &&
33-
depName !== '@opentelemetry/instrumentation-fs'
33+
depName !== '@opentelemetry/instrumentation-fs' &&
34+
depName !== '@opentelemetry/instrumentation-fastify'
3435
);
3536
});
3637

0 commit comments

Comments
 (0)