Skip to content

[processor/tailsampling] Add gated tail storage extension support#47331

Merged
andrzej-stencel merged 8 commits into
open-telemetry:mainfrom
carsonip:tail-storage-extension
Apr 13, 2026
Merged

[processor/tailsampling] Add gated tail storage extension support#47331
andrzej-stencel merged 8 commits into
open-telemetry:mainfrom
carsonip:tail-storage-extension

Conversation

@carsonip

@carsonip carsonip commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Description

Add a first-step tail storage extension integration for tailsampling so span buffering can be backed by an extension implementation.

This keeps the current in-memory behavior as the default and gates extension-backed tail_storage configuration behind processor.tailsamplingprocessor.tailstorageextension while the interface is still evolving.

There should be no behavior change introduced by this PR.

Link to tracking issue

Part of #42326

Testing

  • make test (in processor/tailsamplingprocessor)
  • make lint (in processor/tailsamplingprocessor)
  • make chlog-validate (repo root)
  • Added/updated unit tests for config validation and extension integration paths

Documentation

  • Updated processor/tailsamplingprocessor/README.md with feature-gate requirements for tail_storage
  • Added .chloggen/tailsamplingprocessor-tail-storage-extension.yaml

Made with Cursor

Add an extension-backed tail storage path behind a feature gate while preserving in-memory default behavior and validating tail_storage config. Include processor/config tests and documentation for enabling the feature gate.

Assisted-by: ChatGPT 5.3-codex
Made-with: Cursor
@carsonip carsonip requested review from a team and jmacd as code owners April 2, 2026 14:11
@github-actions github-actions Bot added the processor/tailsampling Tail sampling processor label Apr 2, 2026
@carsonip carsonip changed the title [processor/tail_sampling] Add gated tail storage extension support [processor/tailsampling] Add gated tail storage extension support Apr 2, 2026
// TailStorageID specifies an optional tail storage extension to use for buffering spans.
// If not set, in-memory tail storage is used.
// It is behind feature gate `processor.tailsamplingprocessor.tailstorageextension`.
TailStorageID *component.ID `mapstructure:"tail_storage"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this should probably be Optional[component.ID]?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Interestingly every component.ID in various config.go in contrib and collector repo seems to be using *component.ID, not configoptional.Optional[component.ID]. Upon further digging I found open-telemetry/opentelemetry-collector#13822 . Let's say when this is resolved, someone could clean up all the *component.ID usages once and for all?

Comment thread processor/tailsamplingprocessor/README.md Outdated
Comment thread processor/tailsamplingprocessor/processor.go Outdated
@edmocosta edmocosta added the ready to merge Code review completed; ready to merge by maintainers label Apr 10, 2026
@andrzej-stencel andrzej-stencel merged commit 6170bca into open-telemetry:main Apr 13, 2026
207 checks passed
AndrewCharlesHay pushed a commit to AndrewCharlesHay/opentelemetry-collector-contrib that referenced this pull request Apr 23, 2026
…en-telemetry#47331)

#### Description
Add a first-step tail storage extension integration for tailsampling so
span buffering can be backed by an extension implementation.

This keeps the current in-memory behavior as the default and gates
extension-backed `tail_storage` configuration behind
`processor.tailsamplingprocessor.tailstorageextension` while the
interface is still evolving.

There should be no behavior change introduced by this PR.

#### Link to tracking issue
Part of open-telemetry#42326

#### Testing
- `make test` (in `processor/tailsamplingprocessor`)
- `make lint` (in `processor/tailsamplingprocessor`)
- `make chlog-validate` (repo root)
- Added/updated unit tests for config validation and extension
integration paths

#### Documentation
- Updated `processor/tailsamplingprocessor/README.md` with feature-gate
requirements for `tail_storage`
- Added `.chloggen/tailsamplingprocessor-tail-storage-extension.yaml`

Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
gracewehner pushed a commit to gracewehner/opentelemetry-collector-contrib that referenced this pull request Apr 29, 2026
…en-telemetry#47331)

#### Description
Add a first-step tail storage extension integration for tailsampling so
span buffering can be backed by an extension implementation.

This keeps the current in-memory behavior as the default and gates
extension-backed `tail_storage` configuration behind
`processor.tailsamplingprocessor.tailstorageextension` while the
interface is still evolving.

There should be no behavior change introduced by this PR.

#### Link to tracking issue
Part of open-telemetry#42326

#### Testing
- `make test` (in `processor/tailsamplingprocessor`)
- `make lint` (in `processor/tailsamplingprocessor`)
- `make chlog-validate` (repo root)
- Added/updated unit tests for config validation and extension
integration paths

#### Documentation
- Updated `processor/tailsamplingprocessor/README.md` with feature-gate
requirements for `tail_storage`
- Added `.chloggen/tailsamplingprocessor-tail-storage-extension.yaml`

Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

processor/tailsampling Tail sampling processor ready to merge Code review completed; ready to merge by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants