Trace #546
Replies: 2 comments
-
This sounds like job for a distributed tracing library. Something like https://opentelemetry.io - you just would have to make sure to use only the core API (https://opentelemetry.io/docs/instrumentation/java/manual/) which allows manual instrumentation without dragging in a bunch of autoinstrumentors which would most probably interfere with BTrace. In order to use the API from a BTrace script you need to switch it to trusted mode (@btrace(trusted = true)) such that you can bypass the BTrace verifier and call the API methods directly. There are few caveats here - you need to add the API jar (plus anything it depends on) to the bootstrap classpath because virtually any method of any class from any classloader will have to have access to the opentelemetry classes. This in turn can conflict with the opentelemetry classes from the app classpath so you would have to make sure to use the teaching script only in environments where you can assure these conflicts won't happen. Obviously, this is all rather complicated. I have been playing with an idea of simplifying access to 3rd party libraries via an extension mechanism. |
Beta Was this translation helpful? Give feedback.
-
Will be waiting for that 3rd party libraries usage can take btrace to next level. |
Beta Was this translation helpful? Give feedback.
-
Is there any way in btrace so that we can get same trace id of related logs. like for a request on a java server all logs related to that having a same particular trace id .
Beta Was this translation helpful? Give feedback.
All reactions