Skip to content

Can we use Head-based sampling on iOS? #1713

Description

@Mirconet

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:

  • on the Trace.Configuration init level
  • on the Trace.Configuration.URLSessionTracking init level passed to the Trace.Configuration init

Both 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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions