Hacker News new | ask | show | jobs
by edenfed 970 days ago
It depends on the programming language being instrumented. For Go we are assuming the context.Context object is passed around between different functions or goroutines. For Java, we are using a combination of ThreadLocal tracing and Runnable tracing to support use cases like reactive and multithreaded applications.
2 comments

That’s a very big assumption, at least for Go based applications.
I don't think it's unreasonable, you need a Context to make a gRPC call and you get one when handling a gRPC call. It usually doesn't get lost in between.
True for gRPC, but not necessarily for HTTP - the HTTP client and server packages that ship with Go predate the Context package by quite a long while.
We also thinking on implementing fallback mechanism to automatically propagate context on the same goroutine if context.Context is not passed
Going to be rough for supporting virtual threads then?
We have a solution for virtual thread as well. Currently working on a blog post describing exactly how. Will update once releases