Skip to content

Commit fd08236

Browse files
author
Mrod1598
authored
Change metric to Gauge (#194)
1 parent ce288b0 commit fd08236

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

jmx-metrics/docs/target-systems/tomcat.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ These metrics are sourced from: https://docs.oracle.com/cd/E11857_01/em.111/e101
3838
* Description: Maximum time to process a request.
3939
* Unit: `ms`
4040
* Labels: `proto_handler`
41-
* Instrument Type: LongCounterCallback
41+
* Instrument Type: longValueCallback
4242

4343
* Name: `tomcat.request_count`
4444
* Description: The total requests.

jmx-metrics/src/integrationTest/java/io/opentelemetry/contrib/jmxmetrics/target_systems/TomcatIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void endToEnd() {
9494
attrs.containsOnly(
9595
entry("proto_handler", "\"http-nio-8080\""), entry("state", "busy"))),
9696
metric ->
97-
assertSumWithAttributes(
97+
assertGaugeWithAttributes(
9898
metric,
9999
"tomcat.max_time",
100100
"Maximum time to process a request.",

jmx-metrics/src/main/resources/target-systems/tomcat.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ otel.instrument(beantomcatrequestProcessor, "tomcat.request_count", "The total r
2727
"requestCount", otel.&longCounterCallback)
2828
otel.instrument(beantomcatrequestProcessor, "tomcat.max_time", "Maximum time to process a request.", "ms",
2929
["proto_handler" : { mbean -> mbean.name().getKeyProperty("name") }],
30-
"maxTime", otel.&longCounterCallback)
30+
"maxTime", otel.&longValueCallback)
3131
otel.instrument(beantomcatrequestProcessor, "tomcat.processing_time", "The total processing time.", "ms",
3232
["proto_handler" : { mbean -> mbean.name().getKeyProperty("name") }],
3333
"processingTime", otel.&longCounterCallback)

0 commit comments

Comments
 (0)