Sampling Rates Management

I've been testing Elastic Stack 7.3.0 with RUM agent 4.4.0 and Java agent 1.8.0.
So far, managing the sampling rate in Kibana is straightforward for the Java agent. Great job on this one :slight_smile:

I would like to confirm though if RUM is not yet configurable this way? I assume it is not as no matter what setting I do in Kibana the sampling rate fro RUM remains 100%.

Will there be work to make RUM transaction sampling possible via Kibana?

Follow up question: is it possible to split the sampling rate of distributed transactions such that RUM is at 100% but distributed traces will be at a fraction of that?

Thanks!

Hi,

You are correct, Sampling Rate Management is works for backend agents only, RUM is not configurable yet. Support for RUM is being worked on.
You can follow https://github.com/elastic/apm-agent-rum-js/issues/253 to track progress if you are interested.

If you have several services, you can configure them independently to have different sampling rates.

Juan

Thanks for the info on the work on adding RUM to the Kibana managed sampling @jalvz, much appreciated.

Regarding the split sampling rates for distributed trace, my understanding is that sampling is done at the entrypoint, so that if I have instrumented services A as 1.0 (A is JS-RUM), and B as 0.5 and C as 1.0 (B & C are in Java), the path A --> B will always be instrumented as 1.0 but B --> C will always be 0.5.

We are interested in doing an A --> B --> C where only A is 1.0 but from B--> C is 0.5.

Use case: we want 100% sampling for RUM (service A in this example), but only partial sampling for distributed traces once it hits our backend services (services B and C).

Thanks!

Hello,

Yes, that is how it works.

Let us know if you encounter any issues, any feedback is always welcome!

Hello,

Turns out that that is not correct, and I have been explained how it works:

The sampling decision is made by which ever agent initiates the trace and that decision is pass along to the rest of services in a header. So unfortunately, having different sampling rates for distributed traces is not possible today.

There is a small note about that behavior in https://www.elastic.co/guide/en/apm/agent/rum-js/current/distributed-tracing-guide.html, we will make sure to document that behavior better.

Sorry for my earlier mistake!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.