Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recombine transformer ignores skip logic #37438

Open
RoryCrispin opened this issue Jan 23, 2025 · 1 comment
Open

Recombine transformer ignores skip logic #37438

RoryCrispin opened this issue Jan 23, 2025 · 1 comment
Labels
bug Something isn't working needs triage New item requiring triage pkg/stanza

Comments

@RoryCrispin
Copy link

RoryCrispin commented Jan 23, 2025

Component(s)

pkg/stanza

What happened?

Description

The Recombine transformer does not respect Skip logic, for example:

        - type: recombine
          is_first_entry: body matches "^(\\s*\\d{4}[.]\\d{2}[.]\\d{2}|{.date)"
          combine_field: body
          combine_with: "\n"
          source_identifier: attributes["log.file.path"]
          if: resource.app matches "^clickhouse-"

should only apply when the 'if' condition returns truthy, however in practice it executes for every log line.

The following patch was added to our fork to re-implement the correct logic;
ClickHouse@a080642

Steps to Reproduce

Create a simple recombine transformer with an if gate

Expected Result

The transformer should only operate when the if evaluates truthily

Actual Result

The transformer always operates

Collector version

v0.118.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

Log output

Additional context

No response

@RoryCrispin RoryCrispin added bug Something isn't working needs triage New item requiring triage labels Jan 23, 2025
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage pkg/stanza
Projects
None yet
Development

No branches or pull requests

1 participant