apm-server icon indicating copy to clipboard operation
apm-server copied to clipboard

Support more fields in Tail-Based Sampling(TBS) policy settings.

Open jmoon-elastic opened this issue 6 months ago • 0 comments

Based on the following documents, sample_rate, trace.name, trace.outcome, service.name and service.environment are the only supported options for configuring the TBS Policies at present. https://www.elastic.co/guide/en/observability/8.18/apm-tail-based-samling-config.html#apm-configuration-tbs-policy https://www.elastic.co/guide/en/observability/8.17/apm-sampling.html#_policy_settings

For some traces, the supported fields(e.g. service.name) holds a value too generic(kong-t01) or even don't exist which makes it difficult to configure the TBS policy especially when the application code cannot be changed in case of the auto(zero-code) instrumentation.

This could be a result of misconfigured APM agent, application code or limitation on the current APM/OTel solution but having an option to use another field(e.g. url.full) which hold more specific value would help with configuring the TBS policy as required efficiently.

Please consider enhancing the feature for the Tail-Based Sampling (TBS) policies to support additional fields(such as url.*) for configuring TBS policies. This would allow for more granular control and filtering of trace data, accommodating scenarios where the existing fields are not present due to misconfigurations or limitations in the monitored application code.

Thank you!

jmoon-elastic avatar Jun 18 '25 00:06 jmoon-elastic