-
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
When span time is small (e.g., less than 1s), discard the span and do not display the span in the trace #1552
Comments
How can I do that |
Jaeger does not support that. If you like to propose an enhancement, please describe business requirement / user story (this was asked in the issue template, btw). |
When jaeger was used in our project, it produced a lot of spans, and we wanted to reduce the number of spans. So we want to remove the low time consuming span from the traces, such as the [mysql select] span, except for the high time consuming span we want to keep |
@tiffon @everett980 this would be a pretty nice filter to have on the UI. |
@yzpangu have you tried expand/collapse functionality in the UI? It allows you to focus on important spans already. |
I mean it's not just no need shown on the UI, it's not stored. These low time consuming spans don't make much sense to us, and storage costs are high.I want discard it when span time is small,no stored |
In the current architecture it is not easy to suppress the storage of such spans. Each span records a reference to its parent, so if you have a chain A->B->C and span B meets your criteria of being "too short", if we simply drop it then span C will become orphaned and the UI will have to show it as the top-level span. To be able to cleanly exclude certain spans from the graph you first need to collect the full trace. We have some plans to look into pre-aggregating traces before storing (because that would allow batched writes, which are more efficient in Cassandra), but I can't give any timeline of when this will be implemented. |
I see. Thank you |
How do you determine that a trace is "done" ? |
for the purpose of storage it's not necessary to know if the trace is "done", since it's just a performance optimization. |
@yzpangu I suppose that you only need to customize the Reporter interface to meet your needs.But it only can meet your part of needs because of the reasons mentioned above by @yurishkuro . e.g. If the span has no child span like [mysql select] span,you can customize reporter. ` import java.util.Map; public class MySqlCustomeizeReporter implements Reporter {
} |
@yurishkuro maybe jaeger should support customize the Reporter interface and Sampler interface, as @wuyupengwoaini said. make it More scalable import com.yunzong.taoist.common.customize.reporter.MyReporter;
import io.jaegertracing.Configuration;
import io.jaegertracing.internal.JaegerTracer;
import io.jaegertracing.spi.Reporter;
public class MyConfiguration extends Configuration{
public MyConfiguration(String serviceName) {
super(serviceName);
// TODO Auto-generated constructor stub
}
@Override
public JaegerTracer.Builder getTracerBuilder() {
JaegerTracer.Builder builder = super.getTracerBuilder();
Reporter realReporter = builder.getReporter(); // The parent class does not define this method, I defined and recompile the jar
MyReporter reporter = new MyReporter(realReporter,20);
builder.withReporter(reporter);
return builder;
}
} |
Here is my solution
|
@quaff your solution can easily lead to broken traces, per my earlier #1552 (comment) |
@yurishkuro I realize that, so I add some tag conditions to mitigate it. |
now duplicate of jaegertracing/jaeger-ui#435 |
When span time is small (e.g., less than 1s), discard the span and do not display the span in the trace
The text was updated successfully, but these errors were encountered: