Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Publish metrics to MC and JMX #15560
Metrics are recorded to a ringbuffer that Management Center can read out
Besides the described mechanism used for recording and publishing,
The client protocol changes required for the
@blazember we've made since some additions to the metrics, maybe you want to have a look at the latest state? https://github.com/hazelcast/hazelcast-jet/tree/master/hazelcast-jet-core/src/main/java/com/hazelcast/jet/impl/metrics In general, the compressor and so on have been made into separate classes. We'd also need some hooks to register additional publishers. (see JobMetricsPublisher) for example.
Metrics are recorded to a ringbuffer that Management Center can read out by using ReadMetricsMessageTask. The task reads the metrics recorded since the last seen sequence number. The next sequence number that MC can continue reading the Metrics with is returned in the response. The ringbuffer, the ReadMetricsOperation and the task are almost identical copies of the similar Jet classes. Besides the described mechanism used for recording and publishing, configuring the metrics system has also changed. Before this commit, metrics could be configured with JVM arguments, now it can be done with MetricsConfig both on the member and on the client side. This configuration is shared with the diagnostic's MetricsPlugin. The client protocol changes required for the ReadMetricsMessageTask is also include in this commit.
- Typos - Make ConcurrentArrayRingbuffer#getCapacity() not synchronized - Introducing master-switch and mc-enabled flag to turn off collecting to MC buffers - Along with the master-switch, register custom publishers only if the master-switch is enabled