-
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
Allow denylisting in the string-attribute-filter #30155
Comments
When this does get implemented, please use the term |
Ah, yes! Thank you, title updated. (Description kept to retain context.) |
Hi. Do we have any suggestions on how the configuration could look like for this? |
here's a starting suggestion based on testdata examples for the tailsampling and attributes processors: processors:
tail_sampling:
decision_wait: 10s
num_traces: 100
expected_new_traces_per_sec: 10
policies:
include:
numeric_attribute:
- key: httpRequest.latency
- min_value: 1000
exclude:
string_attribute:
- key: route
values:
- "/v[0-9]+\.Health\.Check$/"
- "/^admin/" This example would include for sampling any span that had a request latency of greater than 1 second. It would exclude anything on a route matching the specified regexes, like In general, it might be nice to harmonise the config for these processors as much as possible. The AttributesProcessor runs a pre-process stage that decides whether or not to perform any actions. In this it is quite similar to the TailSamplingProcessor, only differing in what action to take (update/add a key/value vs send/drop the trace). The config to determine to perform this very similar filtering is very different though. If you're amenable to the spirit of this, I'm happy to have a go at modifying the StringAttributeProcessor to support it. And then we could decide if it makes sense to extract the logic to work for other processors. |
Add missing unit tests to the currently implemented attribute filters (`stringAttributeFilter` and `numericAttributeFilter`) **Link to tracking Issue:** This can be considered part of #226
Add missing unit tests to the currently implemented attribute filters (`stringAttributeFilter` and `numericAttributeFilter`) **Link to tracking Issue:** This can be considered part of #226
Hi @majelbstoat , I am not sure if it is a good idea to have I also sent a PR to enhance |
Hi @mxiamxia, from my understanding, filtering with the attributes processor (or the span processor) can not achieve the same effect as filtering in the tailsampling processor. Attributes and span processors can include or exclude individual spans based on their individual properties, while filtering in the tailsampling processor includes or excludes whole traces based on any of the comprising spans. |
@mxiamxia are you working on this issue? Will re-assign otherwise. Lmk. Thx. |
@mxiamxia are you still planning to submit a PR for this issue? Else I will re-assign. Let me know. Thx. |
I think the issue isn't progressing, I'd love to come up with a fix for this. |
* api(trace): change trace id to byte array. * fix lint errors * add helper to create trace id from hex and improve stdout exporter. * remove comma. * fix lint * change TraceIDFromHex to be compliant with w3 trace-context * revert remove of hex16 regex because its used to parse SpanID * lint * fix typo
Heyy, is this issue still valid? |
I was looking into this issue and I have some questions. Firstly, I was wondering if having denylisting is functionally the same as I think you can rewrite @majelbstoat 's example like this: (which predates the
Currently, it seems that The benefit of doing this instead of adding include/exclude fields is that it's backward compatible (moving policies into a new attribute — ie., into I'm new to this project, so let me know if I've misunderstood something. Would also appreciate some direction on what to do next. Thanks! |
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 |
Currently, the string-attribute-filter in OpenCensus collector allows spans to be exported if they match specified strings, i.e. whitelisted. It is, however, currently not possible to create a blacklist.
One specific use-case for this is to exclude traces for
grpc.health.v1.HealthCheck
, which are a standard way of adding liveness and readiness endpoints to GRPC servers, but which add lots of noise to trace lists. (The current SpanContext for OpenCensus does not include the span name, so exclusion at that point is not possible either.)From a flexibility point of view, it would be ideal if there was some sort of simple syntax for including or excluding partial matches too, whether through regexes, globs etc, though latency might be a consideration. At a minimum though, the ability to blacklist certain strings would be great.
Per @songy23, this blocked by open-telemetry/opentelemetry-collector#221.
The text was updated successfully, but these errors were encountered: