open-telemetry / open-telemetry/opentelemetry-java-contrib

[Samplers] How to drop multiple span_kinds

Open
#2,499 2 comments 0 reactions 2 assignees View on GitHub

@jack-berg is already working on this.

Since Dec 3, 2025.

component:samplers enhancement
Dominant language
Java
Stars
269
Forks
196
Avg merge
2d 7h
Merged PRs (30d)
38

Description

Component(s)

samplers

Is your feature request related to a problem? Please describe.

span_kind: SERVER

tracer_provider:
  sampler:
    parent_based:
      root:
        rule_based_routing:
          fallback_sampler:
            always_on:
          span_kind: SERVER
          rules:
            - action: DROP
              attribute: url.path
              pattern: /health.*
            - action: DROP
              attribute: url.path
              pattern: /actuator.*

I want to drop the redis heartbeat, I don't know if it's supported.

            - action: DROP
              attribute: db.statement
              pattern: ^PING$
            - action: DROP
              attribute: db.statement
              pattern: ^QUIT$
Describe the solution you'd like

I looked at https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/cel-sampler, is it necessary to add the CEL-Based sampler to the extension?

Describe alternatives you've considered

No response

Additional context

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.