Skip to content

feat(nestjs): Switch to otel core instrumentation #16663

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/nestjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/core": "^1.30.1",
"@opentelemetry/instrumentation": "0.57.2",
"@opentelemetry/instrumentation-nestjs-core": "0.44.1",
"@opentelemetry/instrumentation-nestjs-core": "^0.48.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h: This version of the instrumentation is based on otel v2. See https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-nestjs-core/CHANGELOG.md#0450-2025-03-18

We can't really go ahead with this I'm afraid.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cry

"@opentelemetry/semantic-conventions": "^1.34.0",
"@sentry/core": "9.30.0",
"@sentry/node": "9.30.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/nestjs/src/integrations/nest.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { NestInstrumentation as NestInstrumentationCore } from '@opentelemetry/instrumentation-nestjs-core';
import { defineIntegration } from '@sentry/core';
import { generateInstrumentOnce } from '@sentry/node';
import { NestInstrumentation } from './sentry-nest-core-instrumentation';
import { SentryNestEventInstrumentation } from './sentry-nest-event-instrumentation';
import { SentryNestInstrumentation } from './sentry-nest-instrumentation';

const INTEGRATION_NAME = 'Nest';

const instrumentNestCore = generateInstrumentOnce('Nest-Core', () => {
return new NestInstrumentation();
return new NestInstrumentationCore();
});

const instrumentNestCommon = generateInstrumentOnce('Nest-Common', () => {
Expand Down
307 changes: 0 additions & 307 deletions packages/nestjs/src/integrations/sentry-nest-core-instrumentation.ts

This file was deleted.

31 changes: 23 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5417,6 +5417,13 @@
dependencies:
"@opentelemetry/api" "^1.3.0"

"@opentelemetry/api-logs@0.202.0":
version "0.202.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.202.0.tgz#78ddb3b4a30232fd0916b99f27777b1936355d03"
integrity sha512-fTBjMqKCfotFWfLzaKyhjLvyEyq5vDKTTFfBmx21btv3gvy8Lq6N5Dh2OzqeuN4DjtpSvNT1uNVfg08eD2Rfxw==
dependencies:
"@opentelemetry/api" "^1.3.0"

"@opentelemetry/api-logs@0.57.2":
version "0.57.2"
resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.57.2.tgz#d4001b9aa3580367b40fe889f3540014f766cc87"
Expand Down Expand Up @@ -5625,13 +5632,13 @@
"@opentelemetry/semantic-conventions" "^1.27.0"
"@types/mysql" "2.15.26"

"@opentelemetry/instrumentation-nestjs-core@0.44.1":
version "0.44.1"
resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-nestjs-core/-/instrumentation-nestjs-core-0.44.1.tgz#54ee5877080055732093c59f8a9bc2aba4fae5f0"
integrity sha512-4TXaqJK27QXoMqrt4+hcQ6rKFd8B6V4JfrTJKnqBmWR1cbaqd/uwyl9yxhNH1JEkyo8GaBfdpBC4ZE4FuUhPmg==
"@opentelemetry/instrumentation-nestjs-core@^0.48.0":
version "0.48.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-nestjs-core/-/instrumentation-nestjs-core-0.48.0.tgz#86f1d1af48a6654adc8497a8fccd31eb234a6357"
integrity sha512-ytK4ABSkWcD9vyMU8GpinvodAGaRxBFuxybP/m7sgLtEboXMJjdWnEHb7lH/CX1ICiVKRXWdYg9npdu6yBCW5Q==
dependencies:
"@opentelemetry/instrumentation" "^0.57.1"
"@opentelemetry/semantic-conventions" "^1.27.0"
"@opentelemetry/instrumentation" "^0.202.0"
"@opentelemetry/semantic-conventions" "^1.30.0"

"@opentelemetry/instrumentation-pg@0.51.1":
version "0.51.1"
Expand Down Expand Up @@ -5694,6 +5701,15 @@
require-in-the-middle "^7.1.1"
shimmer "^1.2.1"

"@opentelemetry/instrumentation@^0.202.0":
version "0.202.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.202.0.tgz#9468829b23039e1d675635c63f18c8676dce3079"
integrity sha512-Uz3BxZWPgDwgHM2+vCKEQRh0R8WKrd/q6Tus1vThRClhlPO39Dyz7mDrOr6KuqGXAlBQ1e5Tnymzri4RMZNaWA==
dependencies:
"@opentelemetry/api-logs" "0.202.0"
import-in-the-middle "^1.8.1"
require-in-the-middle "^7.1.1"

"@opentelemetry/propagation-utils@^0.30.16":
version "0.30.16"
resolved "https://registry.yarnpkg.com/@opentelemetry/propagation-utils/-/propagation-utils-0.30.16.tgz#6715d0225b618ea66cf34cc3800fa3452a8475fa"
Expand Down Expand Up @@ -5743,7 +5759,7 @@
resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.28.0.tgz#337fb2bca0453d0726696e745f50064411f646d6"
integrity sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==

"@opentelemetry/semantic-conventions@^1.27.0", "@opentelemetry/semantic-conventions@^1.29.0", "@opentelemetry/semantic-conventions@^1.34.0":
"@opentelemetry/semantic-conventions@^1.27.0", "@opentelemetry/semantic-conventions@^1.29.0", "@opentelemetry/semantic-conventions@^1.30.0", "@opentelemetry/semantic-conventions@^1.34.0":
version "1.34.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.34.0.tgz#8b6a46681b38a4d5947214033ac48128328c1738"
integrity sha512-aKcOkyrorBGlajjRdVoJWHTxfxO1vCNHLJVlSDaRHDIdjU+pX8IYQPvPDkYiujKLbRnWU+1TBwEt0QRgSm4SGA==
Expand Down Expand Up @@ -27148,7 +27164,6 @@ stylus@0.59.0, stylus@^0.59.0:

sucrase@^3.27.0, sucrase@^3.35.0, sucrase@getsentry/sucrase#es2020-polyfills:
version "3.36.0"
uid fd682f6129e507c00bb4e6319cc5d6b767e36061
resolved "https://codeload.github.com/getsentry/sucrase/tar.gz/fd682f6129e507c00bb4e6319cc5d6b767e36061"
dependencies:
"@jridgewell/gen-mapping" "^0.3.2"
Expand Down
Loading