Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Please add an example of trace propagation. #631

Open
GlenTiki opened this issue Jul 15, 2019 · 2 comments
Open

Please add an example of trace propagation. #631

GlenTiki opened this issue Jul 15, 2019 · 2 comments

Comments

@GlenTiki
Copy link

I've been trying to figure out how to do trace propagation between micro-services and have been unable to figure out the api. An example will solve this for me. The example would ideally contain two running services, one to create a root span, ping the other service and propagate trace headers through the request, and for the child span to pick up the remote parent. I'd also like to see the ability to selectively create root or child spans based on the presence of the request headers in the second service.

I think documentation also needs work around this, but an example is quicker and probably easier right now.

@mayurkale22
Copy link
Member

@thekemkid Thanks for asking this! I think https://github.com/census-instrumentation/opencensus-node/tree/master/examples/express and https://github.com/census-instrumentation/opencensus-node/tree/master/examples/http examples should give you some idea about trace propagation across multiple services. Let me know if this helps/

@yuriatgoogle
Copy link

At the risk of shameless self-promotion - you can see working examples of context propagation here, albeit in Golang:

https://github.com/yuriatgoogle/opencensus-demo/tree/master/go/http

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

No branches or pull requests

3 participants