-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(otel): Disable node tracing auto instrumentation when using otel #6144
Conversation
71492a8
to
312b948
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this LGTM and I think we can merge this.
Just out of curiousity: The way I understand this, with this change we'd call setupOnce
but early return if we see that the instrumenter is something else than 'sentry'
. I'm wondering if we could achieve the same thing by simply removing the integrations from the list in the Node SDK's init function? You probably already thought this through so take this as a question rather than a request to change anything
Honestly, there wasn't a great reason for this. There has already been some logic for "skipping" integrations in there, which is why I added onto there. But IMHO the other approach could also work well 🤔 I guess, if we remove entries after So, I'm fine with either approach, really. I guess the key question is what place should "own" the decision to skip, the integration itself or a more central/global place. Let me know if you prefer the other solution, then I can also change it. |
As I said, I'm fine with both options as well and if there is already logic to skip in the integrations then that makes an argument to add it there as well. The only reason I'd see to maybe do it in the init call is that custom integrations that don't check for the instrumenter could be skipped as well. Although I don't know how we want to handle that in general (maybe something we should consider for all SDKs?) |
yeah, the tricky part is that we don't want to skip all integrations, only ones that create transactions 😅 So I don't think we can realistically filter out integrations generally (Sidenote: Kind of related to #4790, if we could split up integrations into single responsibilities and maybe even tag them somehow e.g. with a type or so, then we could actually dynamically filter them out, possibly. That would be nice!) So, then I'd say I will go with the current approach (simply because it is done), but we maybe can/should revisit this when we (hopefully) at some point revisit integrations a bit. |
Sounds good to me 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One day we will revamp the integrations API.
and when it happens it will be a glorious
until then we do what it takes.
size-limit report 📦
|
With this PR, when
instrumenter: 'otel'
is configured in the Node SDK, any auto-instrumentation that generates transactions is skipped.This is a bit tricky to test, so I created a separate PR for the tests, if we don't like the approach: #6143
ref #6127