Skip to content

Would a common http response id header be helpful? #48

Open
@codefromthecrypt

Description

@codefromthecrypt

@nicmunroe and @jcarres-mdsol mentioned something that isn't unusual. Should we log the trace id of a zipkin trace as an http response header? This originally came up in b3, but it is really cross-cutting.

For example, it is the same concern with GRPC, Jaeger and HTrace (who use a different propagation than B3, but still report to zipkin). It will also be the same concern with GRPC tracing.

Historically, some have copied the B3-TraceId header to the response. This has an advantage of parity when using B3, but also the disadvantage of being scoped to B3.

  • Not everyone who does http propagation use B3, yet everyone who use zipkin have compatible trace identifiers.
  • B3 also is also more a tracing internal than a user spec. If we expose this header, we add lock-in to a very specific propagation style, which is likely to be obviated at some point especially when we do single-sided spans.
  • Response is scope creep for B3. For example, it is an outbound propagation style, so it doesn't actually have scope for the response, even if manually implemented seems convenient.

Another option is to define a response header for the zipkin trace id, and use it without regards to propagation. Ex "x-zipkin-traceid"

  • this would be in zipkin-specific documentation for the tracer, which is the default if a zipkin tracer.
  • this doesn't couple to a specific propagation system.
  • if we end up defining log correlation, we could build on this.
  • this might imply copying the same value twice where a different trace identifier is in use. ex the htrace response header and also the zipkin one.

Another option is status quo aka punt.. add documentation for those who encode an application-specific trace identifier. Ex "x-wingtips-trace" or something.

  • this could be documented where other things like log context correlation are
  • this doesn't couple to a specific propagation system
  • this has a disadvantage of being different. Ex zipkin users might need to learn 3 or more different response headers.

cc @shalako @marcingrzejszczak @openzipkin/cross-implementation-team-zipkin-pinpoint-htrace-etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions