tracing icon indicating copy to clipboard operation
tracing copied to clipboard

Improve filtering out middle span by SpanExportingPredicate

Open quaff opened this issue 2 years ago • 2 comments
trafficstars

If we have spans like

A > 
   B > 
       C
  1. with leaf span C dropped, It's expected that spans will be
A > 
   B
  1. 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

  1. 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?

quaff avatar May 19 '23 03:05 quaff

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?

jonatan-ivanov avatar May 19 '23 19:05 jonatan-ivanov

For the sake of documentation, I think these are related:

Could you please tell us how you "drop" spans? Are you using an ObservationPredicate or a SpanExportingPredicate or a SpanHandler or 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.

quaff avatar May 22 '23 01:05 quaff