Replies: 1 comment
-
I think I found the solution: Instead of doing this new ParentBasedSampler({ root: baseSampler }) I have to do this: new ParentBasedSampler({
root: baseSampler,
localParentNotSampled: baseSampler,
localParentSampled: baseSampler,
}) So all traces with a local parent that are going through are passed to the baseSampler. The remote spans should not be affected by this, because they should always be sampled based on their parent status |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My setup
An express api written in typescript. With user authentication middleware and ~200 routes.
Hey there,
I'm currently trying to build a custom sampler that will just always sample when a specific Header value is being send or when a parent trace context was passed.
For this I build these two functions (sampler and middleware to fill the context):
Does anyone have an idea on how I can configure the outer ParentBasedSampler to not 'remove' the context that is being passed to the CustomRequestSampler?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions