Monitoring Data Report
Default Reporter
There ara two default reporter for monitor data. They are ConsoleReporter and FileMetricsManagerReporter.
Extend Report
The base interface for monitor data report is Reporter
, with start()
and stop()
method.
All reporter implemented Reporter
. You can implement these class as below.
- Reporter Base interface
- ScheduledMetricsReporter Scheduled reporter for Metrics
- ConsoleReporter Console reporter for Metrics
- FileMetricsManagerReporter File reporter for Metrics
- CustomReporter Custom reporter
- TraceReporter Reporter for trace
Custom Report
Here is definition for CustomReporter
. You should implement the report
method to report your custom data.
class MyReporter extends CustomReporter {
metricsManager;
endPointService;
async report() {
// TODO execute report method where interval
}
}
The CustomReporter
class has two property, metricManager
and endPointService
. They contain almost every Pandora.js monitor ability.
The metricsManager
interface is Here
The endPointService
has getEndPoint()
method, you can get your need with different EndPoint.