Appendix B - Event Aggregation Mechanism

This appendix covers the event aggregation mechanism in the Central Server. It will try to answer the fundamental question: "When are two events considered to be of the same origin (or cause) and therefore reported as one?"

Event properties

To answer this question we first have to define the different properties (or attributes) that define an event. Here is a list of the attributes that are used for aggregation along with a short definition:

Another property that is taken into account is the event status. Only events that are not closed are aggregated.

Events are not aggregated when they are one of the following:

Zend Error Events

The following properties must be equal for events that are of type "zenderror":

  1. Type (note: this is a Zend error type, like E_WARNING, not monitor error type)

  2. Source file

  3. Line number

  4. Function name

  5. Location

  6. Aggregation hint

The Error text attribute must be 75% similar. (To learn more about text similarity read http://uk.php.net/manual/en/function.similar-text.php)

Function Error Events

The following properties must be equal for events that are of type "funcerror" or "dberror":

  1. Source file

  2. Line number

  3. Function name

  4. Location

  5. Aggregation hint

If one of the events has an Error text attribute than the Error texts must be the same (not similar!).

Long Function Events

The following properties must be equal for events that are of type "longfunction" or "longquery":

  1. Script id

  2. Source file

  3. Line number

  4. Function name

  5. Location

  6. Aggregation hint

  7. Severity

Custom Events

The following properties must be equal for custom events:

  1. Type (this is the first parameter user provides)

  2. Severity

  3. Event text

  4. Source file

  5. Line number

Additional Events

The rest of the events are aggregated according to following attributes if two conditions are met:

  1. The event type is one of the following: "devmem", "memsize", "devscript", "outsize" or "longscript".

  2. The event has a script id attribute

For these events the following attributes must be equal:

  1. Type

  2. Script id

  3. Location

  4. Severity