mchr3k/org.intrace — Issue #12: Feature request:  Listener API to eavesdrop on trace events
Author: eostermueller
Created: 2012-01-01 14:04:33+00:00
State: open

Expose a set of interfaces that allows a programmer to write a program (called the Implementor) that receives all InTrace trace events.

The classes java.util.Observable and java.util.Observer could be used as a model for some, but not all, of the interaction between InTrace and an Implementor.

Each Implementor would run in the same JVM as the InTrace GUI.
Some kind of configuration would store class names of all Implementors. -D parameters would be acceptable for a "first attempt." Once InTrace has all the configuration for a single Implementor, that Implementor will be considered "registered"

The interface must allow the InTrace GUI to ask the Implementor for a human-friendly name that will be used for display in the InTrace GUI.

The interface must allow the InTrace GUI to ask the Implementor for an Icon unique for that Implementor. If none is provided, a default (but unique one) will be used.

At GUI startup time, InTrace will ask each registered "Implementor" for a list of
-- classes to be instrumented. Include/exclude functionality should be incorporated.
-- Filters to be used. Include/exclude functionality should be incorporated.
Once the above and any other initialization is complete, InTrace GUI should invoke some kind of "startup" method on each Implementor.

When the end user closes the GUI, InTrace should notify each Implementor of the shutdown request.

### Implementor display/output ###
Each implementor will have its own "section" in the InTrace GUI.
When InTrace UI starts, the end user will need a menu option to open a particular Implementor with a particular host/port.

### Example Implementors ###
Each of these ideas imitates functionality found in commercially offered APM (Application Performance Monitoring) tools, like CompuWare DynaTrace and CA Introscope.

1) Facility to display Gantt charts for each request of a SOA application being traced. Gantt chart will display response time for each traced method. Important to show "nested" methods.
2) Response time/throughput graphs of instrumented classes
3) List of all SQL statements executed by the application being traced.

Option 1), above, could be expanded to show the following for each SOA request:
a) input xml
b) response xml
c) all SQL requests made during the request
d) all exceptions thrown during the request.