Skip to content

Commit 07c76fd

Browse files
committed
Merge branch 'main' of github.com:open-telemetry/opentelemetry-js-contrib
2 parents 34ef02d + fcca38a commit 07c76fd

File tree

6 files changed

+25
-7
lines changed

6 files changed

+25
-7
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
@@ -138,7 +138,10 @@ const InstrumentationMap = {
138138
'@opentelemetry/instrumentation-winston': WinstonInstrumentation,
139139
};
140140

141-
const defaultExcludedInstrumentations = ['@opentelemetry/instrumentation-fs'];
141+
const defaultExcludedInstrumentations = [
142+
'@opentelemetry/instrumentation-fs',
143+
'@opentelemetry/instrumentation-fastify',
144+
];
142145

143146
// Config types inferred automatically from the first argument of the constructor
144147
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

plugins/node/opentelemetry-instrumentation-fastify/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
[![NPM Published Version][npm-img]][npm-url]
44
[![Apache License][license-image]][license-image]
55

6-
This module provides automatic instrumentation for the [`fastify`](https://www.fastify.io/) module, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle.
6+
> [!IMPORTANT]
7+
> 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.
8+
> Please see [here](https://github.com/fastify/otel?tab=readme-ov-file#usage) for instructions on how to use `@fastify/otel`.
9+
>
10+
> We will stop publishing new versions of `@opentelemetry/instrumentation-fastify` on June 30, 2025.
711
8-
If total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](`https://www.npmjs.com/package/@opentelemetry/sdk-node`) for the most seamless instrumentation experience.
12+
This module provides automatic instrumentation for the [`fastify`](https://www.fastify.dev/) module, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package.
913

1014
Compatible with OpenTelemetry JS API and SDK `1.0+`.
1115

plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
4747

4848
export const ANONYMOUS_NAME = 'anonymous';
4949

50-
/** Fastify instrumentation for OpenTelemetry */
50+
/**
51+
* Fastify instrumentation for OpenTelemetry
52+
* @deprecated This instrumentation is deprecated in favor of the official instrumentation package `@fastify/otel`,
53+
* which is maintained by the fastify authors.
54+
*/
5155
export class FastifyInstrumentation extends InstrumentationBase<FastifyInstrumentationConfig> {
5256
constructor(config: FastifyInstrumentationConfig = {}) {
5357
super(PACKAGE_NAME, PACKAGE_VERSION, config);

scripts/lint-readme.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const monorepoRoot = path.resolve(__dirname, '..');
77
const autoInstrumentationNodeDeps = require(`${monorepoRoot}/metapackages/auto-instrumentations-node/package.json`).dependencies;
88
const autoInstrumentationWebDeps = require(`${monorepoRoot}/metapackages/auto-instrumentations-web/package.json`).dependencies;
99

10+
// remove exempt instrumentations
11+
delete autoInstrumentationNodeDeps['@opentelemetry/instrumentation-fastify'];
12+
1013
// extract info from package.json
1114
const packageJsonUrl = path.resolve(`${packageRoot}/package.json`);
1215
const pjson = require(packageJsonUrl);
@@ -74,7 +77,7 @@ Compatible with OpenTelemetry JS API and SDK \`1.0+\`.
7477
const distText = `If total installation size is not constrained, it is recommended to use the [\`@opentelemetry/auto-instrumentations-web\`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-web) bundle with [\`@opentelemetry/sdk-trace-web\`](https://www.npmjs.com/package/@opentelemetry/sdk-trace-web) for the most seamless instrumentation experience.
7578
7679
Compatible with OpenTelemetry JS API and SDK \`1.0+\`.
77-
`;
80+
`;
7881

7982
if (!currentReadmeContent.includes(distText)) {
8083
throw new Error(

0 commit comments

Comments
 (0)