Skip to content

Commit 3c2055c

Browse files
authored
chore(opentelemetry-node)!: drop instrumentation-fastify (#1395)
Upstream has dropped instrumentation-fastify, so we are as well. The test case has changed to verify that using EDOT Node.js and the 3rd-party @fastify/otel works. Refs: open-telemetry/opentelemetry-js-contrib#3409
1 parent 025d2d5 commit 3c2055c

File tree

10 files changed

+424
-1550
lines changed

10 files changed

+424
-1550
lines changed

docs/release-notes/breaking-changes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ Breaking changes can impact your Elastic applications, potentially disrupting no
4242
% 4. You can then call the link from any Kibana code. For example: `href: docLinks.links.upgradeAssistant.id`
4343
% Check https://docs.elastic.dev/docs/kibana-doc-links (internal) for more details about the Doc links service.
4444

45+
## version.next [edot-node-X.X.X-breaking-changes]
46+
47+
::::{dropdown} `OTEL_NODE_ENABLED_INSTRUMENTATIONS=fastify,...` will no longer enable Fastify instrumentation
48+
49+
OpenTelemetry JS has stopped maintaining `@opentelemetry/instrumentation-fastify`, in favor of the separate `@fastify/otel` instrumentation maintained by the Fastify authors. As a result, `@opentelemetry/instrumentation-fastify` has been removed from EDOT Node.js. There is no change in *default* behavior, because the instrumentation had previously been deprecated and required opting-in to enable it.
50+
51+
If you are using the `OTEL_NODE_ENABLED_INSTRUMENTATIONS=fastify,...` environment variable to enable Fastify instrumentation, this will no longer work. You must manually use the [`@fastify/otel` package](https://github.com/fastify/otel#readme). This [bootstrap script](https://github.com/elastic/elastic-otel-node/blob/main/packages/opentelemetry-node/test/fixtures/telemetry-with-fastify-otel.mjs) shows how EDOT Node.js and `@fastify/otel` can be used together to achieve the similar behavior.
52+
::::
53+
4554
## 1.2.0 [edot-node-1.2.0-breaking-changes]
4655

4756
::::{dropdown} Change usage of "redis-4" to "redis" in `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and `OTEL_NODE_DISABLED_INSTRUMENTATIONS`

docs/release-notes/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ To check for security updates, go to [Security announcements for the Elastic sta
4141
- [`v2.6.1` release](https://github.com/open-telemetry/opentelemetry-js/releases/tag/v2.6.1) from opentelemetry-js
4242
- [`experimental/v0.214.0` release](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.214.0) from opentelemetry-js
4343
- [opentelemetry-js-contrib release](https://github.com/open-telemetry/opentelemetry-js-contrib/pull/3415)
44-
- Notably, [`@opentelemetry/instrumentation-fastify` has been removed](https://github.com/open-telemetry/opentelemetry-js-contrib/pull/3409).
44+
- Notably, [`@opentelemetry/instrumentation-fastify` is no longer being updated](https://github.com/open-telemetry/opentelemetry-js-contrib/pull/3409), in favor of `@fastify/otel`.
45+
46+
* Because `@opentelemetry/instrumentation-fastify` is no longer being maintained, it has been removed from EDOT Node.js. This matches the removal from `@opentelemetry/auto-instrumentations-node`. See the [breaking changes note for this release](./breaking-changes.md) for details on how to switch to `@fastify/otel` instrumentation.
4547

4648

4749
## 1.9.0 [edot-node-1.9.0-release-notes]

packages/opentelemetry-node/lib/instrumentations.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const {log} = require('./logging');
2222
* "@opentelemetry/instrumentation-dataloader": import('@opentelemetry/instrumentation-dataloader').DataloaderInstrumentationConfig,
2323
* "@opentelemetry/instrumentation-dns": import('@opentelemetry/instrumentation-dns').DnsInstrumentationConfig,
2424
* "@opentelemetry/instrumentation-express": import('@opentelemetry/instrumentation-express').ExpressInstrumentationConfig,
25-
* "@opentelemetry/instrumentation-fastify": import('@opentelemetry/instrumentation-fastify').FastifyInstrumentationConfig,
2625
* "@opentelemetry/instrumentation-fs": import('@opentelemetry/instrumentation-fs').FsInstrumentationConfig,
2726
* "@opentelemetry/instrumentation-generic-pool": import('@opentelemetry/instrumentation').InstrumentationConfig,
2827
* "@opentelemetry/instrumentation-graphql": import('@opentelemetry/instrumentation-graphql').GraphQLInstrumentation,
@@ -80,9 +79,6 @@ const {
8079
ExpressInstrumentation,
8180
} = require('@opentelemetry/instrumentation-express');
8281
const {FsInstrumentation} = require('@opentelemetry/instrumentation-fs');
83-
const {
84-
FastifyInstrumentation,
85-
} = require('@opentelemetry/instrumentation-fastify');
8682
const {
8783
GenericPoolInstrumentation,
8884
} = require('@opentelemetry/instrumentation-generic-pool');
@@ -177,8 +173,6 @@ const instrumentationsMap = {
177173
'@opentelemetry/instrumentation-dns': (cfg) => new DnsInstrumentation(cfg),
178174
'@opentelemetry/instrumentation-express': (cfg) =>
179175
new ExpressInstrumentation(cfg),
180-
'@opentelemetry/instrumentation-fastify': (cfg) =>
181-
new FastifyInstrumentation(cfg),
182176
'@opentelemetry/instrumentation-fs': (cfg) => new FsInstrumentation(cfg),
183177
'@opentelemetry/instrumentation-generic-pool': (cfg) =>
184178
new GenericPoolInstrumentation(cfg),
@@ -237,10 +231,7 @@ const instrumentationsMap = {
237231
new WinstonInstrumentation(cfg),
238232
};
239233

240-
const excludedInstrumentations = new Set([
241-
'@opentelemetry/instrumentation-fastify',
242-
'@opentelemetry/instrumentation-fs',
243-
]);
234+
const excludedInstrumentations = new Set(['@opentelemetry/instrumentation-fs']);
244235

245236
const otelInstrPrefix = '@opentelemetry/instrumentation-';
246237
const otelInstrShortNames = new Set();

0 commit comments

Comments
 (0)