Package trading.keysquare.api.monitoring


package trading.keysquare.api.monitoring
Provides application readiness, status and metric reporting APIs.

session.monitoring() returns KeySessionMonitoring, which acts as the entry point for reporting readiness, custom status, counters and histograms.

Values recorded on counters and histograms are automatically published to the platform every minute.

Example


 // Publish overall application readiness
 session.monitoring().readinessState(ReadinessState.READY);

 // Publish an arbitrary custom status
 session.monitoring().applicationCustomStatus("Rfq", Status.OK, "RFQs Received");

 // Create counters before or after starting the session.
 Counter counter = session.monitoring().createCounter("Requests");
 counter.increment();

 // Create histograms before or after starting the session.
 Histogram histogram = session.monitoring().createHistogram("AnalyticsCalculations");
 histogram.recordValue(latencyNanos);
 
  • Interfaces
    Class
    Description
    Counter metric created with session.monitoring().createCounter(name).
    Histogram metric created with session.monitoring().createHistogram(name).