-
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
New component: Span Event Filter Processor #7151
Comments
Is this related to #6341 as well? |
In time: we had some discussions about this in the PR I linked earlier but it wouldn't solve the service mesh or auto-instrumentation scenarios you linked. The problem is that we'd need to remap the parent span ID when removing a span, so that the child spans won't hold references to non-existing spans, which could result in broken traces. |
That PR does have behavior desired by many (ability to drop an individual span regardless of potential "missing" spans within traces); I did allude to it here as a potential alternative if it existed... though it does not fulfill the true use case, which is to drop span events and keep the span. |
Thanks, I did miss the part that this is about events in the span, not the whole span. @anuraaga, @bogdandrutu, is this something the transform processor should support? |
@jpkrohling Thanks for pointing out, indeed we would probably add a function for this to the transform processor once the initial framework gets settled in |
I was taking a bit of a look at what would been needed to add this to the transform processor (since I also need the ability to drop span events from spans). It looks like a new function would be required, which could potentially look something like (similar to the delete_matching_keys function)
eg
The problem I'm running into is that functions cannot take a path as an argument. I can either use a Getter or a string, so using "name" is easy but parsing "attributes["exception.message"] is more difficult. The other option I could think of was creating a SpanEventTransformContext. This makes is possible to use the Getter.
Something like this: PS. if this is going to be addressed using the transform processor then maybe change the title of the issue? |
I just looked at the linked PR and got the same issue with Istio/Envoy span events. I found out other span events were created by developers and I'd like to keep those, so having the ability to filter span events by name would be great. The ones that are a problem for me at the moment are Has there been any progress on a new processor or a change to the |
I need to add a SpanEvents context (#14578) so that we'll have the proper access to the event names and attributes, but once that is done we should be able to add a |
….20 (open-telemetry#7151) * remove go 1.18 support, bump minimum to go 1.19 and add testing for 1.20 Signed-off-by: Alex Boten <aboten@lightstep.com> * update chlog Signed-off-by: Alex Boten <aboten@lightstep.com> * add quotes Signed-off-by: Alex Boten <aboten@lightstep.com> --------- Signed-off-by: Alex Boten <aboten@lightstep.com>
Is your feature request related to a problem? Please describe.
While span events can be useful in some circumstances, other times they can be noisy or undesired. Some things like service meshes (Envoy, Istio) and auto-instrumentation (gRPC) attach a lot of span events, and there is currently no way to filter them out of traces.
Describe the solution you'd like
A Span Event Filter Processor would provide the ability to filter out span events based on attributes and names.
Describe alternatives you've considered
Attempting to drop span events from all possible instrumentations is not feasible. Since it's also not possible (yet?) to drop individual spans, dropping the trace entirely or sampling more heavily are other options... but that results in losing more valuable data to filter out unwanted data.
Additional context
There is already a (now closed) PR that I would recommend reviving for this purpose.
The text was updated successfully, but these errors were encountered: