You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Is there any way to give Tracer/IDGenerator a pre-generated ID for a new trace?
Here's what I'm trying to do:
I've got my service and its descendants that support upcoming W3C traceparent standard, and OTL plays along with them nicely.
But between me and clients, there's an nginx proxy w/o any OTL support.
nginx has a Request-ID which looks like trace ID though, so if a request comes to me I'd like to create a new trace w/o parent that has trace ID == Request-ID.
Is it possible to do that with the current API?
IDGenerator has a NewTraceID() that could be used for that if it accepted ctx as an argument.
I've also tried to create my own HTTPExtractor that works, but it has to generate fake span ID since there are no real parent spans to the trace. This won't work because it creates a dangling span w/o a parent.
The text was updated successfully, but these errors were encountered:
Not a direct response to the question, but have you considered using the nginx-opentracing module? It supports zipkin-format trace propagation, which OTel can also support, so while it doesn't help with propagating the W3C headers, it'll at least let you propagate traces...
Based on your description it sounds like you are trying to build a custom trace propagation scheme. To support this you would indeed want to take a look at the HTTPExtractor.
I've also tried to create my own HTTPExtractor that works, but it has to generate fake span ID since there are no real parent spans to the trace. This won't work because it creates a dangling span w/o a parent.
That is going to always be the case based on the problem you described.
nginx has a Request-ID which looks like trace ID though, so if a request comes to me I'd like to create a new trace w/o parent ...
The recommendation @hairyhenderson made about using the B3 encoding to propagate traces sounds like a good alternative. Otherwise, you will need to reinvent-the-wheel to support a full tracing scheme.
Hi! Is there any way to give Tracer/IDGenerator a pre-generated ID for a new trace?
Here's what I'm trying to do:
I've got my service and its descendants that support upcoming W3C
traceparent
standard, and OTL plays along with them nicely.But between me and clients, there's an nginx proxy w/o any OTL support.
nginx has a Request-ID which looks like trace ID though, so if a request comes to me I'd like to create a new trace w/o parent that has trace ID == Request-ID.
Is it possible to do that with the current API?
IDGenerator
has aNewTraceID()
that could be used for that if it acceptedctx
as an argument.I've also tried to create my own
HTTPExtractor
that works, but it has to generate fake span ID since there are no real parent spans to the trace. This won't work because it creates a dangling span w/o a parent.The text was updated successfully, but these errors were encountered: