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

How do we use Metrics Transform Processor? #6224

Closed
tomkerkhove opened this issue Nov 10, 2021 · 3 comments
Closed

How do we use Metrics Transform Processor? #6224

tomkerkhove opened this issue Nov 10, 2021 · 3 comments
Labels
processor/metricstransform Metrics Transform processor question Further information is requested

Comments

@tomkerkhove
Copy link

Being new to processors, I was wondering how I can use the "Metrics Transform Processor" in the OTLP collector?

@alolita alolita added processor/metricstransform Metrics Transform processor question Further information is requested labels Nov 10, 2021
@bertysentry
Copy link
Contributor

In your config yaml file, you simply specify the transforms, like in the example below:

receivers:
  # [...]

processors:
  metricstransform/1:
    transforms:
      # Transform otelcol_some_metric to otel.some.metric
      - include: ^otelcol_([^_]+)_(.*)$$
        match_type: regexp
        action: update
        new_name: otel.$${1}.$${2}

      # Transform my_metric to my.metric
      - include: ^([^_\.]+)_(.*)$$
        match_type: regexp
        action: update
        new_name: $${1}.$${2}

exporters:
  # [...]

service:
  extensions: # your extensions
  pipelines:
    metrics:
      receivers: # your receivers
      processors: [memory_limiter,batch,metricstransform/1] # <-- metricstransform
      exporters: # your exporters

More details about possible metric transforms are documented here.

@tomkerkhove
Copy link
Author

I wasn't able to get it working but will try again, thank you!

@jpkrohling
Copy link
Member

I have a full example as part of this repo:

https://github.com/jpkrohling/opentelemetry-collector-deployment-patterns/blob/main/pattern-2-normalizer

povilasv referenced this issue in coralogix/opentelemetry-collector-contrib Dec 19, 2022
Update some tests to bind to localhost instead of 0.0.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
processor/metricstransform Metrics Transform processor question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants