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

[processor/metricstransform] Aggregate Labels no longer supports aggregating all labels #35120

Closed
SamerJ opened this issue Sep 10, 2024 · 2 comments
Labels
bug Something isn't working internal/core needs triage New item requiring triage processor/metricstransform Metrics Transform processor

Comments

@SamerJ
Copy link
Contributor

SamerJ commented Sep 10, 2024

Component(s)

internal/core, processor/metricstransform

What happened?

Description

In the past, we could use the metrics transformer to aggregate datapoints on any label.
The configuration listed below used to work as is.
Now this is no longer the case

Steps to Reproduce

Setup OTEL to consume a metric with multiple datapoints having different label values.
Use the configuration below.
On version v0.90.1 (up to v105), it should aggregate the datapoints.
On the latest version (starting v106), it will not aggregate the values.

Config

  metricstransform:
    transforms:
      - include: my.metric
        match_type: strict
        action: update
        operations:
          - action: aggregate_labels
            label_set: [ ] # In the past, we could have an empty array. 
            aggregation_type: sum

Expected Result

Aggregation of results

Actual Result

No aggregation happens.

Anaylsis

The behavior changed with the following code change:

Previously:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.105.0/processor/metricstransformprocessor/operation_aggregate_labels.go#L139

Now:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.108.0/internal/coreinternal/aggregateutil/aggregate.go#L36

Collector version

v0.107.0 (also v0.108)

Environment information

Environment

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

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@SamerJ SamerJ added bug Something isn't working needs triage New item requiring triage labels Sep 10, 2024
Copy link
Contributor

Pinging code owners:

  • processor/metricstransform: @dmitryax
  • internal/core: @open-telemetry/collector-approvers

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

@SamerJ
Copy link
Contributor Author

SamerJ commented Oct 25, 2024

Was already covered
#34430

@SamerJ SamerJ closed this as completed Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internal/core needs triage New item requiring triage processor/metricstransform Metrics Transform processor
Projects
None yet
Development

No branches or pull requests

1 participant