Upadte cassandra counters to be non-monotonic where appopriate (#113)
This commit is contained in:
parent
323f91ebeb
commit
3627c835e4
|
|
@ -147,12 +147,18 @@ public abstract class AbstractIntegrationTest {
|
|||
}
|
||||
|
||||
protected void assertSum(Metric metric, String name, String description, String unit) {
|
||||
assertSum(metric, name, description, unit, true);
|
||||
}
|
||||
|
||||
protected void assertSum(
|
||||
Metric metric, String name, String description, String unit, boolean isMonotonic) {
|
||||
assertThat(metric.getName()).isEqualTo(name);
|
||||
assertThat(metric.getDescription()).isEqualTo(description);
|
||||
assertThat(metric.getUnit()).isEqualTo(unit);
|
||||
assertThat(metric.hasSum()).isTrue();
|
||||
assertThat(metric.getSum().getDataPointsList())
|
||||
.satisfiesExactly(point -> assertThat(point.getAttributesList()).isEmpty());
|
||||
assertThat(metric.getSum().getIsMonotonic()).isEqualTo(isMonotonic);
|
||||
}
|
||||
|
||||
protected void assertTypedGauge(
|
||||
|
|
|
|||
|
|
@ -161,7 +161,8 @@ class CassandraIntegrationTest extends AbstractIntegrationTest {
|
|||
metric,
|
||||
"cassandra.storage.load.count",
|
||||
"Size of the on disk data size this node manages",
|
||||
"by"),
|
||||
"by",
|
||||
false),
|
||||
metric ->
|
||||
assertSum(
|
||||
metric,
|
||||
|
|
@ -173,6 +174,7 @@ class CassandraIntegrationTest extends AbstractIntegrationTest {
|
|||
metric,
|
||||
"cassandra.storage.total_hints.in_progress.count",
|
||||
"Number of hints attempting to be sent currently",
|
||||
"1"));
|
||||
"1",
|
||||
false));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ def storageLoad = otel.mbean("${storage},name=Load")
|
|||
otel.instrument(storageLoad,
|
||||
"cassandra.storage.load.count",
|
||||
"Size of the on disk data size this node manages", "by", "Count",
|
||||
otel.&longCounterCallback)
|
||||
otel.&longUpDownCounterCallback)
|
||||
|
||||
def storageTotalHints = otel.mbean("${storage},name=TotalHints")
|
||||
otel.instrument(storageTotalHints,
|
||||
|
|
@ -135,7 +135,7 @@ def storageTotalHintsInProgress = otel.mbean("${storage},name=TotalHintsInProgre
|
|||
otel.instrument(storageTotalHintsInProgress,
|
||||
"cassandra.storage.total_hints.in_progress.count",
|
||||
"Number of hints attempting to be sent currently", "1", "Count",
|
||||
otel.&longCounterCallback)
|
||||
otel.&longUpDownCounterCallback)
|
||||
|
||||
def compaction = "${cassandraMetrics}:type=Compaction"
|
||||
def compactionPendingTasks = otel.mbean("${compaction},name=PendingTasks")
|
||||
|
|
|
|||
Loading…
Reference in New Issue