Format in Stackdriver format #544
Replies: 2 comments 3 replies
-
maybe make use of string api in BTraceUtils to compose & print out json |
Beta Was this translation helpful? Give feedback.
-
This is not readily available as of now. I have been playing with the idea of BTrace plugins or extensions that could be used to provide such extended functionality but so far there hasn't seemed to be much interest in that. Anyway, for the time being you can request 'trusted' mode for your script like @btrace(trusted=true) and then you can use any class available on the classpath visible to the traced class. You could even extend the classpath with eg. a JSON serializer via 'bootClassPath' BTrace agent argument but then you must be extra careful not to introduce duplicate classes as that could affect the traced application. |
Beta Was this translation helpful? Give feedback.
-
I need to output log entries which can be used by stackdriver, which means json output, how can I do this in bTrace script.
Can anyone suggest a way to do that?
And also can we use logger in bTrace script?
Beta Was this translation helpful? Give feedback.
All reactions