Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 130774

Summary: [Tech Preview] Common Base Event instrumentation.
Product: z_Archived Reporter: Paul Slauenwhite <paulslau>
Component: TPTP.monitoringAssignee: Matt Mings <mmings>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: smith
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: All   
OS: All   
URL: http://www.eclipse.org/tptp/groups/Architecture/documents/features/hf_130774.html
Whiteboard:
Bug Depends on:    
Bug Blocks: 148816    
Attachments:
Description Flags
CBELoggingAgentOutputter.java none

Description Paul Slauenwhite CLA 2006-03-07 14:04:51 EST
Common Base Event instrumentation.

Provide support for applications to instrument their code with Common Base Event log and trace statements.  This would include the following function:

1) UI (e.g. wizard) to select certain classes/methods to instrument.  This selection process will include a filtering mechanism similar to the current TPTP Profiling set. 
2) UI (e.g. wizard) to select the scenario (e.g. catch block) to instrument.  These scenarios will e extensible for application-specific scenarios beyond the core log and trace scenarios.
3) UI (e.g. wizard) to provide a named and typed Common Base Event factory for generating Common Base Events at run-time.  See http://www.eclipse.org/tptp/platform/documents/design/cbe101impl/Common_Base_Event_Factory_Design.html for more information.
4) UI (e.g. wizard) to map scenario (e.g. catch block) and run-time (e.g. method/class names) properties to Common Base Event properties based on the Common Base Event V1.0.1 specification (http://www.eclipse.org/tptp/platform/documents/resources/cbe101spec/CommonBaseEvent_SituationData_V1.0.1.pdf).  This mapping function will be extensible (e.g. code snippet) for resolving application-specific values for Common Base Event properties.  For example, run-time specific situation and sourceComponentId properties.  Default values will be provided for required Common Base Event properties.  Finally, function will be provided to validate the mapped Common Base Event in the UI to ensure its correctness.
5) UI (e.g. wizard), preference (e.g. panel) or environment variable to specify the consumer of generated Common Base Events at run-time.  This configuration would also include filtering (e.g. logging level) and any formatting and/or conversion required to consume the Common Base Event.  TPTP will provide consumer support for the currently supported logging facilities (Apache Commons, Apache Log4J and JSR-047 Java Logging) and the Logging Agent.
6) TPTP ProbeKit probes to instrument application code with Common Base Event log and trace statements.  
7) UI (e.g. launch configuration) to execute an instrumented application.  This launch configuration will be shared between enhancement https://bugs.eclipse.org/bugs/show_bug.cgi?id=128731 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=130765.
Comment 1 Dave Smith CLA 2006-03-14 13:12:09 EST
Reassigning to feature owner.
Comment 2 Dave Smith CLA 2006-03-28 11:44:24 EST
Targetting this to iteration 3 as it probably won't be completed for iteration 2.
Comment 3 Dave Smith CLA 2006-04-05 13:34:30 EDT
This feature was approved by PMC to be added to the 4.2 Feature Plan. 
Retargetting to i3 when code will be fully tested.
Comment 4 Paul Slauenwhite CLA 2006-05-01 12:36:18 EDT
Created attachment 39957 [details]
CBELoggingAgentOutputter.java

Regarding point #5 (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=130774#c0), the first approach should be to log the instrumented Common Base Events to a single Logging Agent or a Logging Agent per user configurable component (e.g. package, class, application, etc.).  See the attached CBELoggingAgentOutputter.java class for an example Logging Agent outputter that writes all instrumented Common Base Events to a single Logging Agent.

The next approach is to provide logging instrumentation similar to the Common Base Event instrumentation.  For example, using Java Logging, the user can instrument their application with logging calls to a user configurable named logger (e.g. package, class, application, etc.) that include Common Base Event instrumentation.  This logging instrumentation should be done for the existing supported logging facilities (Apache
Commons, Apache Log4J and JSR-047 Java Logging).  Finally, there is a use case for configuration and controlling the logging instrumentation (e.g. loggers and their configuration) using the new JMX instrumentation and managed resource view(s).
Comment 5 Matt Mings CLA 2006-05-19 10:01:04 EDT
- Added CBE probe to CBE events to selected code
- Added the CBE analysis type to the instrumentation collector
- Added a filter to to select certain classes/methods to instrument.
- In the CBE wizard the user can select the between three scenarios; catch, entry, and exit
Comment 6 Paul Slauenwhite CLA 2006-06-27 10:13:37 EDT
Verified in TPTP-4.2.0-200606190100.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=148816 for additional improvements to the Common Base Event instrumentation.