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

otlp processor transform rename metric not work #2017

Open
chenfango opened this issue Nov 1, 2024 · 1 comment
Open

otlp processor transform rename metric not work #2017

chenfango opened this issue Nov 1, 2024 · 1 comment

Comments

@chenfango
Copy link

Description: rename metric Not in effect, What's the problem?

Config
otelcol.processor.transform "app_attr" {
error_mode = "ignore"
metric_statements {
context = "datapoint"
statements = [
set(attributes["collector"], "grafana-alloy") where attributes["collector"] == nil,
]
}

    metric_statements {
      context = "metric"
      statements = [
        `set(name, "azure_successe2elatency_alloy") where name == "azure_successe2elatency_count"`,
      ]
    }
@chenfango
Copy link
Author

  otelcol.processor.transform "app_attr" {
    error_mode = "ignore"
    metric_statements {
      context = "datapoint"
      statements = [
        `set(attributes["collector"], "grafana-alloy") where attributes["collector"] == nil`,
      ]
    }

    metric_statements {
      context = "metric"
      statements = [
        `set(name, "azure_successe2elatency_alloy") where name == "azure_successe2elatency_count"`,
      ]
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant