Skip to content

Sentry Node.js ESM + OTEL instrumentation blockers - Part 3 #12806

Description

@AbhiPrasad

With the release of v8 of the Sentry SDK, the Node SDK now relies on OpenTelemetry. OpenTelemetry instrumentation does have some problems though (particularly with ESM because of import-in-the-middle), so this issue aims at documented these gaps.

Part 1: #12242
Part 2: #12485

With 8.15.0 + import-in-the-middle@1.9.0 we released most of the fixes for Part 2, but there are a new set of bugs for us to release fixes for. This is tracked in this issue.

### import-in-the-middle PRs to be merged
- [ ] https://github.com/nodejs/import-in-the-middle/pull/115
- [ ] https://github.com/nodejs/import-in-the-middle/pull/142
- [ ] https://github.com/nodejs/import-in-the-middle/pull/140
- [ ] https://github.com/nodejs/import-in-the-middle/pull/145
- [ ] https://github.com/nodejs/import-in-the-middle/pull/146
- [ ] https://github.com/nodejs/import-in-the-middle/pull/148
### Sentry issues
- [ ] https://github.com/getsentry/sentry-javascript/issues/12414
- [ ] https://github.com/getsentry/sentry-javascript/issues/12622
- [ ] https://github.com/getsentry/sentry-javascript/issues/12807
- [ ] https://github.com/getsentry/sentry-javascript/issues/12912

1. openai shims causes issues

Issue: #12414

IITM issue: nodejs/import-in-the-middle#38
Asking about this to Node.js loaders team: nodejs/loaders#198 (comment)

2. CJS identifiers that don't work in ESM break

Issue: #12622

IITM issue: nodejs/import-in-the-middle#94
Fix: nodejs/import-in-the-middle#115

3. Unexpected closing brace error from import-in-the-middle (affects discordjs)

Issue: #12807

Repro: https://github.com/bubooon/sentry-nuxt-nitro-example

4. No spans are created for Node http.get calls in ESM mode

Issue: open-telemetry/opentelemetry-js#4857

Repro: https://github.com/Lms24/otel-node-http-get-esm-reproduction

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions