Skip to content

Instantly share code, notes, and snippets.

@dkuebric
Created May 21, 2015 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkuebric/ba379f9ad55e2d517b2e to your computer and use it in GitHub Desktop.
Save dkuebric/ba379f9ad55e2d517b2e to your computer and use it in GitHub Desktop.
TraceView Java API Example
// 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