-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
Component(s)
samplers
Is your feature request related to a problem? Please describe.
The declarative configuration RuleBasedRoutingSampler currently only supports defining multiple rules. But this rules only apply for one span_kind.
In a Spring boot application application typically the actuator endpoint will be dropped by the sampler. In addition some background tasks (span_kind=Internal) should also be dropped.
Currently this is not possible at the moment
sampler:
parent_based:
root:
rule_based_routing:
fallback_sampler:
always_on:
span_kind: SERVER # Should be defined on the rules level
rules:
# Drop spans where url.path matches the regex /actuator.* (i.e. spring boot actuator endpoints).
- action: DROP
attribute: url.path
pattern: /actuator.*
# Drop some async database lookups, span_kind=Internal
- action: DROP
attribute: db.sql.table
pattern: ACT_RU_JOBDescribe the solution you'd like
Introduce a set of rules to allow for more samplers.
sampler:
parent_based:
root:
rule_based_routing:
fallback_sampler:
always_on:
rule_sets:
- span_kind: SERVER
rules:
# Drop spans where url.path matches the regex /actuator.* (i.e. spring boot actuator endpoints).
- action: DROP
attribute: url.path
pattern: /actuator.*
- span_kind: Internal
rules:
- action: DROP
attribute: db.sql.table
pattern: ACT_RU_JOBDescribe alternatives you've considered
It similar to the open-telemetry/opentelemetry-configuration#102 proposal.
Additional context
No response
AlessandroPinna