-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Return traceId in header response. #11931
Comments
/cc @kenfinnigan, @Ladicek |
I think this makes sense, though there probably should be a configuration switch to turn it off. (I think it's pretty safe to have it on by default, even in production, but some users in highly regulated environments would probably like to turn it off.) CC @pavolloffay |
I'd prefer it the other way around, off by default except when running with @dcdh can you elaborate on the use case? Is it purely for testing in development, or some other reason? |
@kenfinnigan I am working for a client for an internal platform compound of several micro-services. We use the Spring Boot + Spring Cloud Sleuth ... stack. Spring Cloud Sleuth add in our response header some data coming from opentracing like |
Tracing is, by definition, meant for production. I just wonder what would happen in case the tracer decides not to sample the trace. I don't know, but I hope that there's a way to detect that and either not include the header in the response at all, or somehow indicate that the trace is not sampled. |
This seems like a good feature. |
The IDs should be generated when though the trace is not being sampled. We could propagate the sampling bit also to inform the caller. |
Ok, so I was speaking about b3 propagation. Info about specification can be found here https://github.com/openzipkin/b3-propagation |
Yea, sorry for not being clear. I understand that each trace has an ID, even if the tracer decides to not sample it. I was just wondering what should we do in such case, or if there's even something we can do. |
For the W3C Trace Context there was a spec added for response headers w3c/trace-context#365, so it should also be added to the W3C propagation. |
Yes similar to Spring Boot it should respect incoming HTTP headers for Trace/Span and always put them on the outgoing response. This way you can trace microservice to microservice calls across your organization. This is similar to what Spring Boot Slueth does. |
Could anyone confirm if this is correct, Should I create a PR ? smallrye/smallrye-opentracing@main...mfpc:smallrye-opentracing:traceID-header-response |
According to this w3c draft the response header should be called |
Good point @dcdh in this proposal! Ps. I also undestand with you proposal doesn't should not affect any client propagation headers that should keep working as before, respecting the propagation strategy like x-b3, w3 or other. |
Hi @brunobat how are you? |
I'd say, given the discussion, there is no consensus and I don't see this as a priority, for now. |
Let's try to move on with this.
Try first to create the tests to what you expect. |
As mentioned earlier, there is an open W3C draft for a standardized response header https://w3c.github.io/trace-context/#traceresponse-header |
You are right @Legion2. |
Description
To debug more easily an Ajax request I propose to return the traceId in response header.
Implementation ideas
I've follow this code https://github.com/quarkusio/quarkus/blob/master/extensions/jaeger/runtime/src/main/java/io/quarkus/jaeger/runtime/MDCScope.java
I guess it should be implemented in
quarkus-smallrye-opentracing
.Regards,
Damien
The text was updated successfully, but these errors were encountered: