A utility to serialize the com.twitter.util.events.Sink to JSON.
A utility to serialize the com.twitter.util.events.Sink in a format readable by Trace Viewer.
A utility to serialize the com.twitter.util.events.Sink in a format readable by Trace Viewer.
Add the following to the onExit
hook to export the Sink to a file when the
server exits, or place it behind an endpoint to be triggered by request.
val trace = Writer.fromOutputStream(new FileOutputStream("sink.trace.json")) val done = Reader.copy(TraceEventSink.serialize(Sink.default), trace) ensure trace.close() Await.result(done, 3.seconds)
A utility to serialize the com.twitter.util.events.Sink to JSON.
Add the following to the
onExit
hook to export the Sink to a file when the server exits, or place it behind an endpoint to be triggered by request.