Skip to content

[processor/tailsampling] Add feature gate to change default error_mode to ignore#48435

Draft
singhvishalkr wants to merge 1 commit into
open-telemetry:mainfrom
singhvishalkr:fix-48420-tailsampling-error-mode-default
Draft

[processor/tailsampling] Add feature gate to change default error_mode to ignore#48435
singhvishalkr wants to merge 1 commit into
open-telemetry:mainfrom
singhvishalkr:fix-48420-tailsampling-error-mode-default

Conversation

@singhvishalkr
Copy link
Copy Markdown

I noticed the tailsampling processor's ottl_condition policy type defaults to error_mode: propagate, which drops the entire payload when any OTTL condition encounters an error. This can be unexpected - a single malformed record causes data loss.

This PR adds a feature gate processor.tailsamplingprocessor.defaultErrorModeIgnore that, when enabled, changes the default to ignore. With this setting, records that fail OTTL evaluation are skipped but other valid records are preserved. I modeled this on the same feature gates I just added for the routing and signaltometrics connectors (#48418, #48419).

The feature gate starts at alpha stage. Users can opt-in via --feature-gates=processor.tailsamplingprocessor.defaultErrorModeIgnore. Once stability is proven, the gate can progress to beta/stable to make ignore the permanent default.

Changes:

  • Added feature gate definition in metadata.yaml
  • Updated processor.go to use the feature-gated default when error_mode is not explicitly set
  • Added docs to OTTLConditionCfg.ErrorMode explaining the feature gate
  • Added unit test covering both gate states
  • Created changelog entry

Fixes #48420

…e to ignore


Add processor.tailsamplingprocessor.defaultErrorModeIgnore feature gate that when enabled changes the default error_mode for OTTL condition policies from propagate to ignore. This improves resiliency by preserving valid data when OTTL errors occur.

Fixes open-telemetry#48420
@singhvishalkr singhvishalkr requested review from a team and jmacd as code owners May 16, 2026 09:03
@github-actions github-actions Bot added the first-time contributor PRs made by new contributors label May 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

  • Read our Contributing Guidelines.
  • Sign the CLA if you haven't already.
  • First-time contributors should have at most one PR not marked as draft until their first PR is merged.
  • If your change isn't one of our priority components, reviews may take more time.
  • Give reviewers at least a few days before pinging them for feedback.
  • If you need help or struggle to move your PR forward, raise the topic on #otel-collector-dev or a Collector SIG meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-time contributor PRs made by new contributors processor/tailsampling Tail sampling processor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[processor/tailsampling] Change default error_mode to ignore

2 participants