KsqlEngineMetrics¶
Creating Instance¶
KsqlEngineMetrics
takes the following to be created:
- Metrics Group prefix (default:
ksql-engine
) - KsqlEngine
- MetricCollectors
- Custom Metrics Tags
- KsqlMetricsExtension
KsqlEngineMetrics
is created along with KsqlEngine.
getQueryEventListener¶
QueryEventListener getQueryEventListener()
getQueryEventListener
creates a QueryStateMetricsReportingListener with the following:
getQueryEventListener
is used when:
- KsqlEngine is created (to create an EngineContext)
updateMetrics¶
void updateMetrics()
updateMetrics
uses the MetricCollectors to record the performance metrics:
- recordMessagesConsumed with currentConsumptionRate
- recordTotalMessagesConsumed with totalMessageConsumption
- recordTotalBytesConsumed with totalBytesConsumption
- recordMessagesProduced with currentProductionRate
- recordMessageConsumptionByQueryStats with currentConsumptionRateByQuery
- recordErrorRate with currentErrorRate
updateMetrics
is used when:
KsqlEngine
is created