Skip to content

fix: Expose missing otelcol.processor.tail_sampling options#5606

Merged
thampiotr merged 2 commits intomainfrom
cursor/otelcol-tail-sampling-gaps-4ad1
Feb 20, 2026
Merged

fix: Expose missing otelcol.processor.tail_sampling options#5606
thampiotr merged 2 commits intomainfrom
cursor/otelcol-tail-sampling-gaps-4ad1

Conversation

@thampiotr
Copy link
Contributor

@thampiotr thampiotr commented Feb 19, 2026

Brief description of Pull Request

feat(otelcol): Expose missing tail_sampling drop and bytes_limiting options

Pull Request Details

Expose pre-existing missing tail sampling options and policy types in Alloy’s otelcol wrapper and docs.

  • Add sample_on_first_match and drop_pending_traces_on_shutdown to otelcol.processor.tail_sampling arguments and converter mapping.
  • Add bytes_limiting policy support (bytes_per_second, burst_capacity) across top-level policies and nested and, drop, and composite sub-policies.
  • Add drop policy support with drop_sub_policy blocks.
  • Update the component reference docs for new arguments, blocks, policy decisions, and example config.
  • Extend and update tail sampling tests and converter snapshots to cover the new options/policies.

Issue(s) fixed by this Pull Request

Notes to the Reviewer

These changes align the otelcol.processor.tail_sampling component with the features available in upstream tailsamplingprocessor v0.142.0.

PR Checklist

  • Documentation added
  • Tests updated
  • Config converters updated

@cursor
Copy link

cursor bot commented Feb 19, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@github-actions
Copy link
Contributor

💻 Deploy preview available (Otelcol tail sampling gaps):

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR exposes previously missing tail sampling configuration options in Alloy's otelcol.processor.tail_sampling component to align with upstream OpenTelemetry Collector's tailsamplingprocessor v0.142.0 features. The changes add important sampling control mechanisms that were already available in the upstream but not yet exposed in Alloy.

Changes:

  • Added two new top-level arguments (sample_on_first_match and drop_pending_traces_on_shutdown) for controlling sampling behavior and shutdown handling
  • Added bytes_limiting policy type support with bytes_per_second and burst_capacity configuration across top-level policies and nested sub-policies
  • Added drop policy type with drop_sub_policy blocks for explicit trace dropping

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/converter/internal/otelcolconvert/converter_tailsamplingprocessor.go Adds mapping logic for new arguments and policy types in the converter
internal/converter/internal/otelcolconvert/testdata/tail_sampling.yaml Test input data for converter showcasing new options
internal/converter/internal/otelcolconvert/testdata/tail_sampling.alloy Expected converter output with new configurations
internal/component/otelcol/processor/tail_sampling/tail_sampling.go Adds new arguments to component struct and conversion logic
internal/component/otelcol/processor/tail_sampling/types.go Defines new types for bytes_limiting and drop policies with conversion methods
internal/component/otelcol/processor/tail_sampling/tail_sampling_test.go Test cases covering new configuration options
docs/sources/reference/components/otelcol/otelcol.processor.tail_sampling.md Documentation updates for new arguments, policies, and usage examples

@thampiotr thampiotr changed the title Otelcol tail sampling gaps fix: Expose missing otelcol.processor.tail_sampling options Feb 20, 2026
@thampiotr thampiotr marked this pull request as ready for review February 20, 2026 11:29
@thampiotr thampiotr requested review from a team and clayton-cornell as code owners February 20, 2026 11:29
@thampiotr thampiotr merged commit b31ba8f into main Feb 20, 2026
53 of 54 checks passed
@thampiotr thampiotr deleted the cursor/otelcol-tail-sampling-gaps-4ad1 branch February 20, 2026 12:37
@grafana-alloybot grafana-alloybot bot mentioned this pull request Feb 20, 2026
@github-actions
Copy link
Contributor

💻 Deploy preview deleted (fix: Expose missing otelcol.processor.tail_sampling options).

@kalleep kalleep added the backport/v1.13 Backport to release/v1.13 label Feb 20, 2026
grafana-alloybot bot pushed a commit that referenced this pull request Feb 20, 2026
### Brief description of Pull Request

feat(otelcol): Expose missing tail_sampling drop and bytes_limiting
options

### Pull Request Details

Expose pre-existing missing tail sampling options and policy types in
Alloy’s otelcol wrapper and docs.

- Add `sample_on_first_match` and `drop_pending_traces_on_shutdown` to
`otelcol.processor.tail_sampling` arguments and converter mapping.
- Add `bytes_limiting` policy support (`bytes_per_second`,
`burst_capacity`) across top-level policies and nested `and`, `drop`,
and `composite` sub-policies.
- Add `drop` policy support with `drop_sub_policy` blocks.
- Update the component reference docs for new arguments, blocks, policy
decisions, and example config.
- Extend and update tail sampling tests and converter snapshots to cover
the new options/policies.

### Issue(s) fixed by this Pull Request

<!-- Fixes #issue_id -->

### Notes to the Reviewer

These changes align the `otelcol.processor.tail_sampling` component with
the features available in upstream `tailsamplingprocessor` v0.142.0.

### PR Checklist

- [x] Documentation added
- [x] Tests updated
- [x] Config converters updated

(cherry picked from commit b31ba8f)
jharvey10 pushed a commit that referenced this pull request Feb 23, 2026
…rt] (#5614)

## Backport of #5606

This PR backports #5606 to release/v1.13.

### Original PR Author
@thampiotr

### Description
### Brief description of Pull Request

feat(otelcol): Expose missing tail_sampling drop and bytes_limiting
options

### Pull Request Details

Expose pre-existing missing tail sampling options and policy types in
Alloy’s otelcol wrapper and docs.

- Add `sample_on_first_match` and `drop_pending_traces_on_shutdown` to
`otelcol.processor.tail_sampling` arguments and converter mapping.
- Add `bytes_limiting` policy support (`bytes_per_second`,
`burst_capacity`) across top-level policies and nested `and`, `drop`,
and `composite` sub-policies.
- Add `drop` policy support with `drop_sub_policy` blocks.
- Update the component reference docs for new arguments, blocks, policy
decisions, and example config.
- Extend and update tail sampling tests and converter snapshots to cover
the new options/policies.

---
*This backport was created automatically.*

Co-authored-by: Piotr <17101802+thampiotr@users.noreply.github.com>
jharvey10 pushed a commit that referenced this pull request Feb 26, 2026
### Brief description of Pull Request

feat(otelcol): Expose missing tail_sampling drop and bytes_limiting
options

### Pull Request Details

Expose pre-existing missing tail sampling options and policy types in
Alloy’s otelcol wrapper and docs.

- Add `sample_on_first_match` and `drop_pending_traces_on_shutdown` to
`otelcol.processor.tail_sampling` arguments and converter mapping.
- Add `bytes_limiting` policy support (`bytes_per_second`,
`burst_capacity`) across top-level policies and nested `and`, `drop`,
and `composite` sub-policies.
- Add `drop` policy support with `drop_sub_policy` blocks.
- Update the component reference docs for new arguments, blocks, policy
decisions, and example config.
- Extend and update tail sampling tests and converter snapshots to cover
the new options/policies.

### Issue(s) fixed by this Pull Request

<!-- Fixes #issue_id -->

### Notes to the Reviewer

These changes align the `otelcol.processor.tail_sampling` component with
the features available in upstream `tailsamplingprocessor` v0.142.0.

### PR Checklist

- [x] Documentation added
- [x] Tests updated
- [x] Config converters updated
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/v1.13 Backport to release/v1.13 frozen-due-to-age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants