Hi, I've been trying to use the filters to hide so...
# general
g
Hi, I've been trying to use the filters to hide some useless queries from being sent, I'm using Helm to deploy SigNoz, but it was not succesfull so far. Here is an example of a request I got, and here is the code I use to filter it:
Copy code
processors:
          filter:
            spans:
              exclude:
                match_type: regexp
                attributes:
                  - Key: http.route    
                    Value: .*\/health.*    
                  - Key: http.route    
                    Value: .*\/prometheus.*    
                  - Key: operation                                                                                                                                                                         
                    Value: OperationHandler.handle
It doesn't work so far, even though the string itself
/actuator/health/**
supposed to be caught by the regex
.*\/health.*
a
cc: @Vishal Sharma
s
Did you add the processor to the pipeline?
g
Yes, I got this:
Copy code
pipelines:    
            traces:    
              receivers: [otlp]    
              processors: [signozspanmetrics/prometheus, batch, filter]    
              exporters: [clickhousetraces]
s
Looking at your screenshot again, the ``/actuator/health/**`` is not
http.route
tag value rather a operation whose filter criteria is hard coded to simply match the value
OperationHandler.handle
Also, filter first if you would like not to include it to be part of the RED metrics calculated by SigNoz that is used to show the
Services
tab.
processors: [filter, signozspanmetrics/prometheus, batch]
g
I'll move the filter as you showed. But I'm not sure to understand the meaning of your previous message: it is not
http.route
? But the right sidebar with more details about this trace seems to indicate it is
a
@Guillaume I get the confusion. The screenshot attached has operation name as
/actuator/health/**
. I marked it in the image in orange. But the screenshot you shared now, has it in
http.route
attribute key
so it has to be included at
- Key: operation
also in the filter processor
g
Indeed, it's confusing me 😅 Ok so do you mean like this?
Copy code
filter:             
            spans:            
              exclude:        
                match_type: regexp      
                attributes:    
                  - Key: http.route     
                    Value: .*\/health.*
                  - Key: operation      
                  - Key: .*\/health.*
a
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/filterprocessor#filter-spans-from-traces
Copy code
filter:             
            spans:            
              exclude:        
                match_type: regexp
                span_names:
                  - .*\/health.*
                attributes:    
                  - Key: http.route     
                    Value: .*\/health.*
as
operation
is not attribute but
name
of span
g
Oh, right, then my last filter is also wrong:
Copy code
- Key: operation
                    Value: OperationHandler.handle
should be this in the end:
Copy code
filter:             
            spans:            
              exclude:        
                match_type: regexp
                span_names:
                  - .*\/health.*
                  - OperationHandler.handle
                attributes:    
                  - Key: http.route     
                    Value: .*\/health.*
a
yes.. I think so
@Guillaume did it work?
g
Hi, sorry for the delay. After setting it up, I could still notice data, through the frontend, with the same pattern as I showed. So I think it did not work this way unfortunately