-
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
OTTL Filter Processor doesn't seem to work for traces #31355
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
You configured service:
pipelines:
traces:
receivers: [ otlp ]
processors: [ filter/drophttp, batch ]
exporters: [ logging, jaeger ] |
i've used in reverse for some other requirement (my_attribute), it only captures that span not entire trace.. what should i configure to capture entire trace filter/drop_others
error_mode: ignore
traces:
span:
- attributes["my_attribute"] == nil |
@krishnaexplore I was going to ask the same thing as well. My use-case is also similar to you. I want to get the complete trace, but only when a custom attribute My filter processor is as follows:
I have modified the same repo to reproduce this: I have added a custom attribute The filter is working and only when we hit below URL. The trace comes for But now it doesn't contain lower level spans, which I need. @TylerHelmuth What can be the approach to get the whole trace on the basis of some custom attribute, which is only added on the root / parent span and not to the child spans. |
The filterprocessor cannot be used to drop entire traces, that is a stateful operation that requires gathering all the spans in a trace. Use the tailsamplingprocessor for that. |
@TylerHelmuth thanks for response,
|
With the tail sampling processor you can, but not with the filter processor.
That's a problem. A solution could be to try to get the same identifying attributes on all spans in the trace you want to drop when you produce the spans. |
Thanks @TylerHelmuth , seems that is the right approach @akshat-io let me know if you need any help!! |
I am going to close this issue as dropping an entire trace is not something the filterprocessor can do. If you have issues about the tailsamplingprocessor please open a new issue. |
@krishnaexplore Here is my otel config:
The I have committed and pushed the code. @krishnaexplore Let me know if you can help me with this. |
Component(s)
processor/filter
What happened?
Description
As per the docs, the filter processor with the config to drop all HTTP spans, should have dropped all spans having 'GET' HTTP method. But they are still showing in Jaeger UI.
Steps to Reproduce
cd spring-cloud-open-telemetry-filter-processor-issue
./mvnw clean install
docker compose up
http://localhost:8080/product/100002
http://localhost:8080/product/100003
http://localhost:8080/product/100004
Expected Result
No traces should be showing in Jaeger UI. As all spans with HTTP request method should have filtered out by the otel-config filter defined here.
Actual Result
The traces are still coming for HTTP spans.
Multiple conditions have been checked, including custom attributes, but the same issue is happening with all.
Collector version
0.81.0
Environment information
Environment
OS: Ubuntu 20.04
Compiler(if manually compiled): Did not compile collector manually, instead used docker image for collector version "0.81.0"
Container: Docker & Docker Compose
(Used docker to start the applications, collector and jaeger).
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: