Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
fix(recombine)!: change default operator type
Browse files Browse the repository at this point in the history
When declaring a `recombine` operator in configuration
without specifying the `id`, the default operator ID is `metadata`.
This can cause issues when user configures
both an actual `metadata` operator and `recombine` operator,
both of them without their `id`s.

BREAKING CHANGE: The default operator ID for `recombine` operator
is now `recombine`, not `metadata`.
  • Loading branch information
andrzej-stencel committed Nov 29, 2021
1 parent 020ff68 commit ab0c356
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/operators/recombine.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `recombine` operator combines consecutive logs into single logs based on sim

| Field | Default | Description |
| --- | --- | --- |
| `id` | `metadata` | A unique identifier for the operator. |
| `id` | `recombine` | A unique identifier for the operator. |
| `output` | Next in pipeline | The connected operator(s) that will receive all outbound entries. |
| `on_error` | `send` | The behavior of the operator if it encounters an error. See [on_error](/docs/types/on_error.md). |
| `is_first_entry` | | An [expression](/docs/types/expression.md) that returns true if the entry being processed is the first entry in a multiline series. |
Expand Down
2 changes: 1 addition & 1 deletion operator/builtin/transformer/recombine/recombine.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func init() {
// NewRecombineOperatorConfig creates a new recombine config with default values
func NewRecombineOperatorConfig(operatorID string) *RecombineOperatorConfig {
return &RecombineOperatorConfig{
TransformerConfig: helper.NewTransformerConfig(operatorID, "metadata"),
TransformerConfig: helper.NewTransformerConfig(operatorID, "recombine"),
MaxBatchSize: 1000,
OverwriteWith: "oldest",
}
Expand Down

0 comments on commit ab0c356

Please sign in to comment.