getsentry / sentry-javascript

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

Improvements on `dataloader` integration #13724

Open onurtemizkan opened 2 months ago

onurtemizkan commented 2 months ago

Problem Statement

Following up: https://github.com/getsentry/sentry-javascript/pull/13664

https://github.com/getsentry/sentry-javascript/pull/13664 introduced basic support for dataloader integration on Sentry Node SDK.

In its current state, the feature set is limited, as there's no hook we can get request / lookup information from the underlying instrumentation @opentelemetry/instrumentation-dataloader.

More info on this: https://github.com/getsentry/sentry-javascript/pull/13664#issue-2518420565

Solution Brainstorm

We can open PRs on https://github.com/open-telemetry/opentelemetry-js-contrib/

AbhiPrasad commented 2 months ago

I think requestHook would be super useful, but luckily we can rely on beforeSendSpan so it's not high priority.

We should see if we can get the extra operations instrumented, and then also see if we can get additional attributes attached to these spans (that then we can use to enable these spans for our cache module).