fix: Expose missing otelcol.processor.tail_sampling options#5606
fix: Expose missing otelcol.processor.tail_sampling options#5606
otelcol.processor.tail_sampling options#5606Conversation
|
Cursor Agent can help with this pull request. Just |
|
💻 Deploy preview available (Otelcol tail sampling gaps): |
There was a problem hiding this comment.
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_matchanddrop_pending_traces_on_shutdown) for controlling sampling behavior and shutdown handling - Added
bytes_limitingpolicy type support withbytes_per_secondandburst_capacityconfiguration across top-level policies and nested sub-policies - Added
droppolicy type withdrop_sub_policyblocks 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 |
otelcol.processor.tail_sampling options
|
💻 Deploy preview deleted (fix: Expose missing |
### 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)
…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>
### 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
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.
sample_on_first_matchanddrop_pending_traces_on_shutdowntootelcol.processor.tail_samplingarguments and converter mapping.bytes_limitingpolicy support (bytes_per_second,burst_capacity) across top-level policies and nestedand,drop, andcompositesub-policies.droppolicy support withdrop_sub_policyblocks.Issue(s) fixed by this Pull Request
Notes to the Reviewer
These changes align the
otelcol.processor.tail_samplingcomponent with the features available in upstreamtailsamplingprocessorv0.142.0.PR Checklist