tracing
tracing copied to clipboard
Improve filtering out middle span by SpanExportingPredicate
If we have spans like
A >
B >
C
- with leaf span C dropped, It's expected that spans will be
A >
B
- with root span A dropped, It's expected that spans will be
B >
C
but a warning show up that span B has invalid parent span
- with middle span B dropped, we expect
A >
C
but got
A
C
and warning show up that span C has invalid parent span
warning by jaeger: invalid parent span IDs=c6ababd1d88b00b1; skipping clock skew adjustment.
Could we reset children's parent span id to fix such skew?
For the sake of documentation, I think these are related:
- https://github.com/micrometer-metrics/micrometer/pull/3843
- https://github.com/micrometer-metrics/micrometer/issues/3678
Could you please tell us how you "drop" spans?
Are you using an ObservationPredicate or a SpanExportingPredicate or a SpanHandler or something else?
For the sake of documentation, I think these are related:
- Introduce withParentOnly for @Observed micrometer#3843
- Provide a simple way to make decisions based on the parent in ObservationPredicate micrometer#3678
Could you please tell us how you "drop" spans? Are you using an
ObservationPredicateor aSpanExportingPredicateor aSpanHandleror something else?
For example I want to drop connection but want to keep it's descendants.
@Bean
SpanExportingPredicate noConnectionSpanExportingPredicate() {
return span -> !span.getName().equals("connection");
}
Sometime I want to drop connection and it's descendants, hopeful both cases are supported.