-
Notifications
You must be signed in to change notification settings - Fork 133
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
Can we use Head-based sampling on iOS? #1713
Comments
Hello @Mirconet 👋. Thank you for this report, I think this is indeed a problem. I added it to our backlog and we will discuss it in the team. We will keep you posted in this GH Issue. I believe you're right that the 2 sampling rates available in traceConfig.sampleRate = 50 // tracer sampling
traceConfig.urlSessionTracking = .init(
firstPartyHostsTracing: .trace(hosts: ["foo.com"], sampleRate: 100) // distributed trace sampling
) The distributed trace sampling should take precedence over tracer sampling in distributed tracing scenario. Meaning that if Unfortunately, I don't see any mitigation / workaround at this moment other than "no sampling" (100% in both). We will keep this thread with updates. |
2.11.0 is out and it includes head-based sampling. Closing the issue. |
Question
We want to use the Head-based sampling, as suggested in your documentation, to keep the entire transaction traces.
We managed to achieve the result in the Android app using the dd-sdk-android. In the Android library, we found two different Sampler interfaces:
The default implementation for the first sampler uses random sampling, while the implementation of the second uses deterministic sampling. Setting our custom sampling frequency only to the deterministic one and 100% to the other permits us to achieve the result on Android.
On the contrary on the DD iOS library, we saw that we could configure the sampling rate in two different points:
Trace.Configuration
init levelTrace.Configuration.URLSessionTracking
init level passed to theTrace.Configuration
initBoth the settings seem to make the tracer use the same random Sampler that doesn't permit us to link the spans between the chain of services and implement a Head-based sampling strategy to keep the entire transaction traces like Android.
How can we achieve this result on iOS?
The text was updated successfully, but these errors were encountered: