diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryStats.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryStats.java index 042fa86d7ad52..fd285ab7574da 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryStats.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryStats.java @@ -59,16 +59,16 @@ static synchronized SchemaRegistryStats getInstance(ScheduledExecutorService sch } private SchemaRegistryStats(ScheduledExecutorService scheduler) { - this.deleteOpsFailedCounter = Counter.build("pulsar_schema_del_ops_failed_count", "-") + this.deleteOpsFailedCounter = Counter.build("pulsar_schema_del_ops_failed_total", "-") .labelNames(NAMESPACE).create().register(); - this.getOpsFailedCounter = Counter.build("pulsar_schema_get_ops_failed_count", "-") + this.getOpsFailedCounter = Counter.build("pulsar_schema_get_ops_failed_total", "-") .labelNames(NAMESPACE).create().register(); - this.putOpsFailedCounter = Counter.build("pulsar_schema_put_ops_failed_count", "-") + this.putOpsFailedCounter = Counter.build("pulsar_schema_put_ops_failed_total", "-") .labelNames(NAMESPACE).create().register(); - this.compatibleCounter = Counter.build("pulsar_schema_compatible_count", "-") + this.compatibleCounter = Counter.build("pulsar_schema_compatible_total", "-") .labelNames(NAMESPACE).create().register(); - this.incompatibleCounter = Counter.build("pulsar_schema_incompatible_count", "-") + this.incompatibleCounter = Counter.build("pulsar_schema_incompatible_total", "-") .labelNames(NAMESPACE).create().register(); this.deleteOpsLatency = this.buildSummary("pulsar_schema_del_ops_latency", "-"); diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/SchemaServiceTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/SchemaServiceTest.java index 6c5eddc731a29..91d7706655ec0 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/SchemaServiceTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/SchemaServiceTest.java @@ -116,11 +116,11 @@ public void testSchemaRegistryMetrics() throws Exception { String metricsStr = output.toString(StandardCharsets.UTF_8); Multimap metrics = PrometheusMetricsTest.parseMetrics(metricsStr); - Collection delMetrics = metrics.get("pulsar_schema_del_ops_failed_count"); + Collection delMetrics = metrics.get("pulsar_schema_del_ops_failed_total"); Assert.assertEquals(delMetrics.size(), 0); - Collection getMetrics = metrics.get("pulsar_schema_get_ops_failed_count"); + Collection getMetrics = metrics.get("pulsar_schema_get_ops_failed_total"); Assert.assertEquals(getMetrics.size(), 0); - Collection putMetrics = metrics.get("pulsar_schema_put_ops_failed_count"); + Collection putMetrics = metrics.get("pulsar_schema_put_ops_failed_total"); Assert.assertEquals(putMetrics.size(), 0); Collection deleteLatency = metrics.get("pulsar_schema_del_ops_latency_count"); diff --git a/site2/docs/reference-metrics.md b/site2/docs/reference-metrics.md index 0d85f3f42b4c1..1ac4afd3dc0ef 100644 --- a/site2/docs/reference-metrics.md +++ b/site2/docs/reference-metrics.md @@ -533,16 +533,16 @@ All the schema metrics are labelled with the following labels: - *cluster*: `cluster=${pulsar_cluster}`. `${pulsar_cluster}` is the cluster name that you have configured in the `broker.conf` file. -| Name | Type | Description | -|---|---|---| -| pulsar_schema_del_ops_failed_count | Counter | Number of failed operations to delete schemas. | -| pulsar_schema_get_ops_failed_count | Counter | Number of failed operations to get schemas. | -| pulsar_schema_put_ops_failed_count | Counter | Number of failed operations to send schemas. | -| pulsar_schema_compatible_count | Counter | Number of compatible schemas. | -| pulsar_schema_incompatible_count | Counter | Number of incompatible schemas. | -| pulsar_schema_del_ops_latency | Summary | Latency of successful operations to delete schemas. | -| pulsar_schema_get_ops_latency | Summary | Latency of successful operations to get schemas. | -| pulsar_schema_put_ops_latency | Summary | Latency of successful operations to send schemas. | +| Name | Type | Description | +|------------------------------------|---------|-----------------------------------------------------| +| pulsar_schema_del_ops_failed_total | Counter | Number of failed operations to delete schemas. | +| pulsar_schema_get_ops_failed_total | Counter | Number of failed operations to get schemas. | +| pulsar_schema_put_ops_failed_total | Counter | Number of failed operations to send schemas. | +| pulsar_schema_compatible_total | Counter | Number of compatible schemas. | +| pulsar_schema_incompatible_total | Counter | Number of incompatible schemas. | +| pulsar_schema_del_ops_latency | Summary | Latency of successful operations to delete schemas. | +| pulsar_schema_get_ops_latency | Summary | Latency of successful operations to get schemas. | +| pulsar_schema_put_ops_latency | Summary | Latency of successful operations to send schemas. | ### Offload metrics