-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(node): Avoid creating breadcrumbs for suppressed requests #16285
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
Conversation
ce2822d
to
756a5aa
Compare
size-limit report 📦
|
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.
Sorry for the naive question but I don't see the immediate connection between breadcrumb generation and tracing being suppressed. As in, breadcrumbs are not part of a trace but "their own" thing and they happen to get attached to transaction payloads (as well as errors). or IOW: Why should suppressTracing
control breadcrumb creation behaviour? Fwiw, we expose beforeAddBreadcrumb
to filter out breadcrumbs users don't want.
Btw, agree that we shouldn't create breadcrumbs for Sentry requests :)
Yeah, this is a valid question :) This basically matches the behavior we originally had, and means that we do not need some heuristic to detect our own API requests anymore, we can just rely on this. It also means that e.g. other analytics/otel requests that users may wrap with Alternatively, we need to re-add some way to identify our own API requests and only filter out these, which is also doable of course :) |
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.
Sorry for the late reply!
I still think it's not "clean" to also include breadcrumbs here but it's pragmatic and what we need as well as what probably the majority of users want. So it's probably one of these "let's roll with it until we or other people complain" changes :D
Some thoughts on alternatives (for when we reach the complaint point):
- Make breadcrumb collection toggleable via an option
- Create a more generalized
Sentry.suppress
(naming tbd) API where you can granularly toggle individual telemetry signals.
It was noticed that we were creating breadcrumbs for sentry-internal requests, which is not desired. This was introduced by us moving breadcrumb generation out of the base http/fetch instrumentation into our own, where we did not look at
suppressTracing
. Now, when tracing is suppressed, no fetch/http breadcrumbs will be created.