Expose data and events
Let's get applicative data and events

Jeyzer Publisher

Jeyzer Publisher is embedded within the monitored application.

Jeyzer Publisher allows the application to participate to its own monitoring.
Basically, the application will expose events and data through the Jeyzer Publisher API.

Jeyzer Publisher is optional but it is highly recommended to reach the ultimate monitoring level of your application.
Why ? Because the JZR report will allow you to get the view on both applicative and technical events.
This is gold when doing correlations. You save hours of investigation.

The Jeyzer Publisher is a Java library and module to include in the monitored application.
From application build side, you just need to add the Jeyzer publisher maven dependency in your project.
The Jeyzer Publisher documentation is javadoc, available here.

Technically, the Jeyzer Recorder will collect the published data and events through a Jeyzer Publisher JMX API.
Note that it doesn’t require to open any JMX port : the Jeyzer Recorder agent will simply access it in memory.
Jeyzer Publisher has been optimized to limit its memory footprint and protect it from flooding.

Jeyzer Publisher is open source project : you know what you execute in production. Full trust and confidence are key.
Jeyzer Publisher is under Mozilla Public License 2.0.

Applicative events represent important steps in any application’s life.
These can be a service interruption, a connectivity issue, an applicative shutdown, a critical error..
Such events should be therefore exposed in the JZR report and bring it to the attention of the IT operators, when critical.

The Jeyzer Publisher API allows you to formalize and publish those events.
These events can be either one shot (ex :state transition) or time ranged (ex : service interruption).
Each event has a level : critical, warning or info. And each level contains sub-levels for better granularity.

Applicative events are collected by the Jeyzer Recorder and processed by the Jeyzer Monitor and Analyzer.
There is no Jeyzer monitoring rule on top of the applicative events : we do consider that the application took already the decision.

Applicative events are codified (see next section).

Published events are codified to facilitate the application support.
Your remember the Oracle error codes : ORA-XXXX ?
Jeyzer Publisher lets you achieving the same.

This is in fact very important and scope of this event codification goes far beyond Jeyzer.
Full error handling is often left away at application design time.
Of course the Java Exceptions are thrown within the application, but are those properly exposed to the support team, other than being printed in log files ?
And these Java Exceptions certainly do not carry a detailed explanation of the issue and how to react upon.
It’s time to do it  better and easily with these event codes (that you will probably carry now upon your exceptions).
Your service support will be grateful for that.

Technically, by implementing the Jeyzer Publisher API, R&D is encouraged to define an event code repository through Java enums.  Note that event codes get documented for free thanks to Javadoc.
Your service support will be again grateful for that event code repository.

Please refer to the Jeyzer Publisher javadoc for more details.

Applicative data are usually counters and text fields that you need to expose outside of the process.
This is typically data that you would access through a classic JMX interface, and which represent process level data.

However, the Jeyzer Publisher allows you to expose this data also at the thread level through Jeyzer actions.
In Jeyzer, an action is distinguished by an action id. It can also carry contextual information (user, function).

Applicative data is collected by the Jeyzer Recorder and processed by the Jeyzer Monitor and Analyzer.
JZR report will permit to display it in various waysand highlight unusual values.
Jeyzer monitoring rules are available to react upon the data value.
For example when the counter goes higher/lower than threshold, or when the status is matching some predefined state.

In regards to the GPRD, it is up to the application to not expose privacy or sensitive data.

Technically, applicative data is exposed through key value pairs at process or action level.

Maven dependency

Add this dependency in your Maven or Gradle build to use the Jeyzer Publisher :

<groupId>org.jeyzer</groupId> <artifactId>jeyzer-publish</artifactId> <version>2.2</version> </dependency>

Java module name : org.jeyzer.publish

Javadoc API

Start here :  Jeyzer Publisher

Implement the Applicative Event and Jeyzer Event Code interfaces.
Fire those events through the Jeyzer Monitor Handler.
Expose applicative data and counters at process or action level.
Check also the Jeyzer demo source code for examples.

Source code

Jeyzer Github repository