GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(opentelemetry): Expose sampling helper by mydea · Pull Request #12674 · getsentry/sentry-javascript Conversation
Member
When users want to use a custom sampler, they can use these new helpers to still have sentry working nicely with whatever they decide to do in there. For e.g. trace propagation etc. to work correctly with Sentry, we need to attach some things to trace state etc. These helpers encapsulate this for the user, while still allowing them to decide however they want if the span should be sampled or not. This was brought up here: #12191 (reply in thread)
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
size-limit report 📦
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@mydea do you have any idea when this patch PR might land in the main branch and be published? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Once this is reviewed and merged, it will go into the next release - probably later this week or early next week it should be out! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| SentrySampler, | ||
| sentrySamplerNoDecision, | ||
| sentrySamplerNotSampled, | ||
| sentrySamplerSampled, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
m: Couldn't we expose a single method that takes in SamplingDecision from @opentelemetry/sdk-trace-base or similar?
sentrySampler({
decision, // SamplingDecision enum
context,
spanAttributes,
})
It feels like a lot of overhead for us to export three different methods, and to me it feels better to expose the underlying enum being used.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
that sounds like a good idea to me! 👍 will adjust this.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
When users want to use a custom sampler, they can use these new helpers to still have sentry working nicely with whatever they decide to do in there. For e.g. trace propagation etc. to work correctly with Sentry, we need to attach some things to trace state etc. These helpers encapsulate this for the user, while still allowing them to decide however they want if the span should be sampled or not.
|
Updated this to instead only export return wrapSamplingDecision({ decision: SamplingDecision.NOT_RECORD, context, spanAttributes }); |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.