4 ms·
It depends on the programming language being instrumented. For Go we are assuming the context.Context object is passed around between different functions or gor
by edenfed 3y 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.
- camel_gopher 3y agoThat’s a very big assumption, at least for Go based applications.
- edenfed 3y agoWe also thinking on implementing fallback mechanism to automatically propagate context on the same goroutine if context.Context is not passed
- nulld3v 3y agoI 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.
- otterley 3y agoTrue 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.
- spullara 3y agoGoing to be rough for supporting virtual threads then?
- edenfed 3y agoWe have a solution for virtual thread as well. Currently working on a blog post describing exactly how. Will update once releases
- marwis 3y agoScopedValue solves that problem: https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/ScopedValue.html https://docs.oracle.com/en/java/javase/21/docs/api/java.base...