eclipse-vertx / vertx-tracing

Vertx integration with tracing libraries
Other
42 stars 34 forks source link

Span timings aren't collected in case of any 5xx error #25

Closed nitishgoyal13 closed 12 months ago

nitishgoyal13 commented 3 years ago

Questions

Span timings aren't getting collected in case of any 5xx error.

Version

4.0.0

oie_gr4991DAnK6Q

Happening consistently with all the spans with error

vietj commented 3 years ago

do you have a reproducer ? it is possible that some span are ignored by the tracing tool if you are using sampling

nitishgoyal13 commented 3 years ago

A span without the duration field is causing the issue

{
  "traceId": "e101cf9a6eaa3755",
  "parentId": "e101cf9a6eaa3755",
  "id": "f610c17b720d6343",
  "kind": "SERVER",
  "name": "publish",
  "localEndpoint": {
    "serviceName": "xxx",
    "ipv4": "a.b.c.d"
  },
  "shared": true
}

In case of 5xx, I am always seeing one span with name = "publish" and this is always without duration. And this span is causing UI not to render the entire trace.

I delete the span with empty duration field and the trace is now visible in the UI

nitishgoyal13 commented 3 years ago

This span with empty duration is getting created in ZipkinTracer class and receiveRequest method with operation as publish

nitishgoyal13 commented 3 years ago

For now, I have done this as a workaround

if (policy == TracingPolicy.IGNORE || operation.equalsIgnoreCase("publish")) {
      return null;
    }
vietj commented 3 years ago

do you have a reproducer ?

tsegismont commented 12 months ago

Missing reproducer