Created
May 21, 2015 01:37
-
-
Save dkuebric/ba379f9ad55e2d517b2e to your computer and use it in GitHub Desktop.
TraceView Java API Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create an entry event | |
TraceEvent event = Trace.createEntryEvent("ActiveMQ"); | |
// Add a little data to give it special treatment in the UI, per https://docs.appneta.com/extending-traceview-customizing specs | |
event.addInfo("IsService", true); | |
event.addInfo("RemoteHost", QUEUE_HOST); | |
event.addInfo("RemoteProtocol", "AMQP"); // or similar | |
event.addInfo("RemoteController", QUEUE_NAME); // this is best with low cardinality of unique queues names; if there are a lot of queues, you may want to instead use a class of queue here | |
// report the event | |
event.report(); | |
// YOUR QUEUE INSERT CODE | |
// Create an exit event | |
TraceEvent event = Trace.createExitEvent("ActiveMQ"); | |
event.report() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment