Skip to content

Commit

Permalink
(otelcol): metrics filter and transform (open-telemetry#1134)
Browse files Browse the repository at this point in the history
* metrics filter and transform

Signed-off-by: Pierre Tessier <pierre@pierretessier.com>

* remove filtered metric

Signed-off-by: Pierre Tessier <pierre@pierretessier.com>

---------

Signed-off-by: Pierre Tessier <pierre@pierretessier.com>
Co-authored-by: Juliano Costa <julianocosta89@outlook.com>
  • Loading branch information
puckpuck and julianocosta89 authored Sep 28, 2023
1 parent 79ea70a commit 6a25074
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions src/otelcollector/otelcol-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,21 @@ exporters:

processors:
batch:
transform:
metric_statements:
- context: metric
statements:
# FIXME: remove this when this is issue is resolved: https://github.com/open-telemetry/opentelemetry-java/issues/4834
- set(description, "") where name == "queueSize"
# FIXME: remove this when the following 2 issues are resolved
# Java: https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/9478
# Go: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/4301
- set(description, "") where name == "rpc.server.duration"
filter/ottl:
error_mode: ignore
metrics:
metric:
# FIXME: remove when a Metrics View is implemented in the checkout and productcatalog components
# or when this issue is resolved: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/3071
- 'name == "rpc.server.duration"'
transform:
metric_statements:
- context: metric
statements:
# FIXME: remove when this issue is resolved: https://github.com/open-telemetry/opentelemetry-java/issues/4834
- set(description, "") where name == "queueSize"
# FIXME: remove when this issue is resolved: https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1958
- set(description, "") where name == "http.client.duration"

connectors:
spanmetrics:
Expand All @@ -39,7 +44,7 @@ service:
exporters: [logging, spanmetrics]
metrics:
receivers: [otlp, spanmetrics]
processors: [transform, batch]
processors: [filter/ottl, transform, batch]
exporters: [logging]
logs:
receivers: [otlp]
Expand Down

0 comments on commit 6a25074

Please sign in to comment.