Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .chloggen/filterprocessor-beta-default-error-mode-ignore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
component: processor/filter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Promote `processor.filter.defaultErrorModeIgnore` feature gate to beta.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [47232]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: The default `error_mode` of the filter processor is now `ignore` instead of `propagate`. To restore the previous behavior, disable the feature gate with `--feature-gates=-processor.filter.defaultErrorModeIgnore`.

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
8 changes: 4 additions & 4 deletions processor/filterprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ This condition translates to: For each span event, check whether its parent span

### Error Modes

The filter processor also allows configuring an optional field, `error_mode`, which will determine how the processor reacts to errors that occur while processing an OTTL condition. `propagate` is the default mode.
The filter processor also allows configuring an optional field, `error_mode`, which will determine how the processor reacts to errors that occur while processing an OTTL condition. `ignore` is the default mode.

| error_mode | description |
|------------|----------------------------------------------------------------------------------------------------------------------------------------|
Expand All @@ -107,13 +107,13 @@ The filter processor also allows configuring an optional field, `error_mode`, wh

##### `processor.filter.defaultErrorModeIgnore`

The `processor.filter.defaultErrorModeIgnore` feature gate changes the default `error_mode` of the filter processor from `propagate` to `ignore`.
The `processor.filter.defaultErrorModeIgnore` feature gate changes the default `error_mode` of the filter processor from `propagate` to `ignore`.
`ignore` is the recommended mode to improve resiliency, as errors are logged for visibility but valid data is preserved, and processing continues with the next condition.
This feature gate is currently in Alpha (disabled by default) and must be explicitly enabled.
This feature gate is currently in Beta (enabled by default).

**Example Usage**

Run the collector with the feature gate enabled: `./otelcol --config config.yaml --feature-gates=processor.filter.defaultErrorModeIgnore`.
To restore the previous default of `propagate`, run the collector with the feature gate disabled: `./otelcol --config config.yaml --feature-gates=-processor.filter.defaultErrorModeIgnore`.

### Basic Config

Expand Down
2 changes: 1 addition & 1 deletion processor/filterprocessor/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Config struct {
// Valid values are `ignore` and `propagate`.
// `ignore` means the processor ignores errors returned by conditions and continues on to the next condition. This is the recommended mode.
// `propagate` means the processor returns the error up the pipeline. This will result in the payload being dropped from the collector.
// The default value is `propagate`. It will change to `ignore` when the `processor.filter.defaultErrorModeIgnore` feature gate is stable.
// The default value is `ignore` when the `processor.filter.defaultErrorModeIgnore` feature gate is enabled (default), and `propagate` when disabled.
ErrorMode ottl.ErrorMode `mapstructure:"error_mode"`

// Deprecated: use TraceConditions instead.
Expand Down
2 changes: 1 addition & 1 deletion processor/filterprocessor/config.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ description: Config defines configuration for Resource processor.
type: object
properties:
error_mode:
description: ErrorMode determines how the processor reacts to errors that occur while processing an OTTL condition. Valid values are `ignore` and `propagate`. `ignore` means the processor ignores errors returned by conditions and continues on to the next condition. This is the recommended mode. `propagate` means the processor returns the error up the pipeline. This will result in the payload being dropped from the collector. The default value is `propagate`. It will change to `ignore` when the `processor.filter.defaultErrorModeIgnore` feature gate is stable.
description: ErrorMode determines how the processor reacts to errors that occur while processing an OTTL condition. Valid values are `ignore` and `propagate`. `ignore` means the processor ignores errors returned by conditions and continues on to the next condition. This is the recommended mode. `propagate` means the processor returns the error up the pipeline. This will result in the payload being dropped from the collector. The default value is `ignore` when the `processor.filter.defaultErrorModeIgnore` feature gate is enabled (default), and `propagate` when disabled.
$ref: /pkg/ottl.error_mode
log_conditions:
type: array
Expand Down
Loading
Loading