Package com.aerospike.client.metrics
Class MetricsWriter
java.lang.Object
com.aerospike.client.metrics.MetricsWriter
- All Implemented Interfaces:
MetricsListener
Default metrics listener. This implementation writes periodic metrics snapshots to a file which
will later be read and forwarded to OpenTelemetry by a separate offline application.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonDisable(com.aerospike.client.cluster.Cluster cluster) Write final cluster metrics snapshot to file and then close the file.voidonEnable(com.aerospike.client.cluster.Cluster cluster, MetricsPolicy policy) Open timestamped metrics file in append mode and write header indicating what metrics will be stored.voidonNodeClose(Node node) Write final node metrics snapshot on node that will be closed.voidonSnapshot(com.aerospike.client.cluster.Cluster cluster) Write cluster metrics snapshot to file.
-
Constructor Details
-
MetricsWriter
Initialize metrics writer.
-
-
Method Details
-
onEnable
Open timestamped metrics file in append mode and write header indicating what metrics will be stored.- Specified by:
onEnablein interfaceMetricsListener
-
onSnapshot
public void onSnapshot(com.aerospike.client.cluster.Cluster cluster) Write cluster metrics snapshot to file.- Specified by:
onSnapshotin interfaceMetricsListener
-
onNodeClose
Write final node metrics snapshot on node that will be closed.- Specified by:
onNodeClosein interfaceMetricsListener
-
onDisable
public void onDisable(com.aerospike.client.cluster.Cluster cluster) Write final cluster metrics snapshot to file and then close the file.- Specified by:
onDisablein interfaceMetricsListener
-