sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

OpenTelemetry Instrumentation Issues

Open AbhiPrasad opened this issue 1 year ago • 2 comments

This is a tracking list of all problems we've encountered around OpenTelemetry instrumentation

### Dependency issues (either OTEL or OTEL instrumentation)
- [ ] https://github.com/prisma/prisma/issues/23410
- [ ] https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1872
- [ ] https://github.com/DataDog/import-in-the-middle/issues/57
- [ ] https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2092
- [ ] https://github.com/DataDog/import-in-the-middle/issues/77
- [ ] Optimize OTEL js to be more treeshakable (concern for serverless and for profiling-node bundle)
### Instrumentation Gaps compared to Sentry
- [ ] https://github.com/getsentry/sentry-javascript/issues/10168
- [ ] https://github.com/getsentry/sentry-javascript/issues/11046
### Documentation Requirements
- [ ] https://github.com/getsentry/sentry-javascript/issues/11064
### ESM Issues
- [x] Need to expose easy way to use OTEL ESM loader from `@sentry/node` and metaframeworks (https://github.com/getsentry/sentry-javascript/pull/11338)
- [ ] Auto-instrumentation does not work for Astro SDK + OTEL because of ESM (cannot provide `--experimental-loader` when starting Astro server)
### Bundling
- [ ] https://github.com/getsentry/sentry-javascript/issues/10940
- [ ] https://github.com/open-telemetry/opentelemetry-js/pull/4593
### OTEL + Sentry Combined Instrumentation
- [ ] What's the correct way to get a reference to tracer provider - https://github.com/getsentry/sentry-javascript/discussions/11235
- [ ] expose way to add sentry to custom propagators

AbhiPrasad avatar Mar 13 '24 02:03 AbhiPrasad

I am still getting the issue described in #11216 in the release version of 8.0. Commenting here since that issue is closed and references this one.

TypeError: prismaInstrumentation.PrismaInstrumentation is not a constructor
    at Object.setupOnce (file:///Users/jonas/Projects/capply/node_modules/@sentry/node/esm/index.js:2381:9)
    at setupIntegration (file:///Users/jonas/Projects/capply/node_modules/@sentry/core/esm/integration.js:111:17)
    at file:///Users/jonas/Projects/capply/node_modules/@sentry/core/esm/integration.js:82:7
    at Array.forEach (<anonymous>)
    at setupIntegrations (file:///Users/jonas/Projects/capply/node_modules/@sentry/core/esm/integration.js:79:16)
    at NodeClient._setupIntegrations (file:///Users/jonas/Projects/capply/node_modules/@sentry/core/esm/baseclient.js:375:26)
    at NodeClient.init (file:///Users/jonas/Projects/capply/node_modules/@sentry/core/esm/baseclient.js:251:12)
    at init (file:///Users/jonas/Projects/capply/node_modules/@sentry/node/esm/index.js:3516:12)
    at file:///Users/jonas/Projects/capply/build/consumer.mjs:4564:3
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)

jnicklas avatar May 14 '24 15:05 jnicklas

@jnicklas responded over at https://github.com/getsentry/sentry-javascript/issues/11216. Let's keep the discussion there since this is just a tracking issue for ourselves to coordinate.

lforst avatar May 14 '24 17:05 lforst

This is a bit hard to track now, I'm going to close this and re-open a new issue that summarizes this a bit better.

AbhiPrasad avatar May 27 '24 16:05 AbhiPrasad