-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
I encountered a problem when I wanted to filter out metrics about certain labels when applying spanmetrics. #34508
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Is the filtering not working just with those metrics that are created with the Can you try this expression? - IsMatch(resource.attributes["span_name"], "GET") |
@Cairry most of the time when a filter isn't working it is because the attribute name or location is wrong. Please enable |
I got the following error after using the method you provided, it seems that the
error
All methods in processors do not meet the requirement of filtering out
|
@Cairry please try
|
wow Thank you very much, your configuration is useful. Does it support regular expression? I hope to filter out span_name that is not GET and POST |
Maybe the syntax was not correct... https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/filterprocessor#examples |
When using the datapoint context, assuming the value is a datapoint attribute, you'd do
or
|
Sorry experts, I have a new problem, which is that I can't filter out the two indicators of duration_count and duration_bucket. Below are my various attempts to filter. Where do I need to correct it?
|
@Frapschen Hello, do you have time to help me look at this problem? It cannot filter out the two indicators of |
@Cairry The original latency metrics name of spanmetrics is
|
Ok thanks, will it filter out the duration_sum? Because I only need the duration_sum. |
In my experience, I will add a debug exporter:
it will log any detailed data in the console. |
I think the filter processor can't do that. |
I understand that these are the basic key indicators that cannot be filtered? Is there any other way? I thought of, for example, adding different labels to different indicators, and then filtering out the metric by label? Because I really don't want duration_bucket and duration_count to exist, because it consumes a lot of resources. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Component(s)
connector/spanmetrics, processor/filter
Describe the issue you're reporting
background:
PromQL:
sum(duration_count{span_name="GET"}) by (span_name)
Sample:
{span_name="GET"} 27972
Need:
I want to filter out the metric whose span_name is GET through filter, but the following configuration does not work.
The above is to simply test the filtering ability. In fact, I want to filter out span_name that does not start with GET or POST. Please help me complete it. Thank you
The text was updated successfully, but these errors were encountered: