Carrying context across requests. #3174
Unanswered
shivchelwa
asked this question in
Q&A
Replies: 1 comment 4 replies
-
I'd have to see some code and try it out to see what might be going wrong. This is definitely an unusual usage of the API, but I don't see anything in principle that wouldn't work. Can you enable the logging exporter with a SimpleSpanProcessor to make sure the spans are actually getting ended properly? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am tracing http requests on my server application. As this request is received by server, span is created for each component the request traverses. The traces are visible in Jaeger and request can be traced just fine.
Now there is a requirement where I have to trace progress of an order across multiple http requests. Along with the http request tracing(which create and update order state), I create a span to trace the order state progress. On the very first state, I use root context to create a span(so as to use a different traceid than current context). And as the order state changes on subsequent http request(may be different os process altogether in a clustered setup), I store the context on the order object using propagator. On the next request as the state changes, context is extracted from the order object, previous span is ended and new span is created using this context. Thus, multiple spans are created in this pattern and as the order is fulfilled, the last span is ended. I do not see any errors but these spans are not exported as a search by trace-id does not yield any results.
Am I missing anything? Is there any issue with usage of API?
Beta Was this translation helpful? Give feedback.
All reactions