Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Can we get the traceId to use for logging? #26

Open
sri420 opened this issue Feb 13, 2018 · 2 comments
Open

Can we get the traceId to use for logging? #26

sri420 opened this issue Feb 13, 2018 · 2 comments

Comments

@sri420
Copy link

sri420 commented Feb 13, 2018

Is there a way to get the traceId which is propagated to Zipkin.

I want to log the traceId in log file during my logging so as to search the logs later.

@Eli-Goldberg
Copy link
Contributor

Eli-Goldberg commented Jul 10, 2018

If you're using Koa, for example, what I would do is add a middleware that takes the X-B3-TraceId from the original incoming request, and assign it onto the context, so the rest of the flow can use that as comfortably.

Take a look at the example here

@xiaoxi625
Copy link

@sri420 In request headers. There is a property named X-B3-TraceId, you can find traceId from there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants