getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.98k stars 1.57k forks source link

Add `dataloaderIntegration` to Node #13313

Closed mydea closed 1 month ago

mydea commented 2 months ago

Description

We want to instrument dataloader. There is an existing OTEL instrumentation for this:

https://www.npmjs.com/package/@opentelemetry/instrumentation-dataloader

### Tasks
- [ ] Add new `dataloaderIntegration` in `@sentry/node`
- [ ] This should set up the OTEL instrumentation
- [ ] Make sure to add an `origin` to all spans the integration emits
- [ ] Add node-integration-tests for the package
- [ ] The integration should be added by default

This is a cache integration, and thus must follow https://develop.sentry.dev/sdk/telemetry/traces/modules/caches/. You can see https://docs.sentry.io/platforms/javascript/guides/node/tracing/instrumentation/custom-instrumentation/caches-module/ for a reference, or look at the redis integration.

AbhiPrasad commented 1 month ago

Follow up tasks documented in https://github.com/getsentry/sentry-javascript/issues/13724

AbhiPrasad commented 1 month ago

Docs PR: https://github.com/getsentry/sentry-docs/pull/11416