-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Otel Processor metric filter is not working as expected #28585
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hello @prateekpatel, just want to make sure I understand: From your configuration it looks like you're explicitly including metrics that match the filter Can you share exactly which metric names you want, and which ones you don't want? Then for the configurations that aren't working, can you share what their output is, and how it's not matching what you'd expect? |
Hi @crobert-1 , I am working together with @prateekpatel on this. I made a slack post on this. |
Copying current status and question from the Slack thread The goal is to keep only the
With this filter in place all metrics end up being filtered, including the |
@crobert-1 could this behaviour be because this is a histogram metric type and _bucket, _sum and _count are considered datapoints where as filtering is done based on metric name which in this case is |
@kizitonzeka have you confirmed, via the debug exporter using detailed verbosity, that the metric name you're using is the name of the metric as it appears in the collector? |
@TylerHelmuth Yes, the metric name is |
Correct, if you filter by metric name it would drop (or keep) the entire metric and all of its datapoints. |
Is there anything else that we can do to help here, or are you able to get filtering working the way you need now? We can close this issue if there's nothing left to do here. |
Thank you so much @crobert-1 @TylerHelmuth, we have more understanding now on how filtering is working and we have made it to suit our need. This issue can be closed. |
@kizitonzeka I am interested to hear how you made it work. I am also facing issues with it. We transform Prometheus metrics from Delta to Cumulative temporality and we have metrics like:
However, when I am trying to use: processors:
filter:
metrics:
exclude:
match_type: strict
metric_names:
- metricA_bucket
|
@karvounis-form3 as far as I know the filtering is done based on metric names and |
Can someone help here? I am trying to stop entire bucket but its not working. Basically dont need any data from this bucket - http_server_duration_milliseconds_bucket receivers: |
Hello @VJ1313, can you please open another issue with your question? You can include a reference to this issue to help give some more context as well. |
Thanks Done. |
Hello, I have the same problem. Since I cannot filter out the two indicators xx_count and xx_bucket, how can I stop them from collecting indicators? I only need xx_sum. |
Component(s)
processor/filter
What happened?
I have the following configuration for my OpenTelemetry (otel) filter processor. Within the receiver configuration, kubelet is scraping node metrics, and the filter is intended to selectively include or exclude metrics based on the filter configuration.
Here's the scrape configuration job in the receiver:
job_name: kubelet
scrape_interval: 1m
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
kubernetes_sd_configs:
api_server: null
relabel_configs:
regex: _meta_kubernetes_node_label(.+)
replacement: kubernetes.default.svc:443
action: replace
target_label: metrics_path
regex: (ip-.*)
replacement: /api/v1/nodes/$${1}/proxy/metrics
In the filter configuration:
filter/metrics:
error_mode: ignore
metrics:
include:
match_type: regexp
metric_names:
- otelcol_receiver_accepted_metric_points_total$
- jvm_memory_used_bytes$
- jvm_threads_states_threads$
- container_cpu_usage_seconds_total$
- kubelet_runtime_operations_duration_seconds_bucket$
However, I'm encountering an issue. While I expect to see the metric name kubelet_runtime_operations_duration_seconds_bucket,' I also observe metrics like 'kubelet_runtime_operations_duration_seconds_sum' and 'kubelet_runtime_operations_duration_seconds_total' in Grafana. Any guidance or insights on resolving this would be greatly appreciated."
I tried below with no success
filter/metrics:
error_mode: ignore
metrics:
include:
match_type: strict
metric_names:
- otelcol_receiver_accepted_metric_points_total
- jvm_memory_used_bytes
- jvm_threads_states_threads
- container_cpu_usage_seconds_total
- kubelet_runtime_operations_duration_seconds
filter/metrics:
error_mode: ignore
metrics:
include:
match_type: regexp
metric_names:
- otelcol.*
- jvm_memory_used_bytes
- jvm_threads_states_threads
- container_cpu_usage_seconds_total
- kubelet_runtime_operations_duration_seconds_buck.*
- volume_operation_total_seconds_bucket.*
Collector version
refinery version v0.17.0
Environment information
Environment
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: