From 39aa64893b26c8e52dc557773b7563516e10dff4 Mon Sep 17 00:00:00 2001 From: Peter Findeisen Date: Wed, 22 Feb 2023 15:57:51 -0800 Subject: [PATCH] 7883 ClassCastException when using -Dotel.jmx.target.system=tomcat Using "1" to specify units of plain cardinality. --- .../javaagent/src/main/resources/jmx/rules/hadoop.yaml | 2 +- .../javaagent/src/main/resources/jmx/rules/jetty.yaml | 4 ++-- .../javaagent/src/main/resources/jmx/rules/tomcat.yaml | 4 ++-- .../javaagent/src/main/resources/jmx/rules/wildfly.yaml | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/hadoop.yaml b/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/hadoop.yaml index f89de461230c..b46591492b97 100644 --- a/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/hadoop.yaml +++ b/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/hadoop.yaml @@ -1,7 +1,7 @@ --- rules: - bean: Hadoop:service=NameNode,name=FSNamesystem - unit: 1 + unit: "1" prefix: hadoop. metricAttribute: node_name: param(tag.Hostname) diff --git a/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/jetty.yaml b/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/jetty.yaml index 021e615cc069..48df62df9f10 100644 --- a/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/jetty.yaml +++ b/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/jetty.yaml @@ -44,7 +44,7 @@ rules: mapping: selectCount: type: counter - unit: 1 + unit: "1" desc: The number of select calls - bean: org.eclipse.jetty.logging:type=jettyloggerfactory,id=* @@ -52,5 +52,5 @@ rules: mapping: LoggerCount: type: updowncounter - unit: 1 + unit: "1" desc: The number of registered loggers by name diff --git a/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/tomcat.yaml b/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/tomcat.yaml index e7041bcc34ac..9a04bada0088 100644 --- a/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/tomcat.yaml +++ b/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/tomcat.yaml @@ -1,7 +1,7 @@ --- rules: - bean: Catalina:type=GlobalRequestProcessor,name=* - unit: 1 + unit: "1" prefix: http.server.tomcat. metricAttribute: name: param(name) @@ -39,7 +39,7 @@ rules: metricAttribute: direction: const(sent) - bean: Catalina:type=Manager,host=localhost,context=* - unit: 1 + unit: "1" prefix: http.server.tomcat. type: updowncounter metricAttribute: diff --git a/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/wildfly.yaml b/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/wildfly.yaml index 82aff5ee9a7f..118f6bb924bc 100644 --- a/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/wildfly.yaml +++ b/instrumentation/jmx-metrics/javaagent/src/main/resources/jmx/rules/wildfly.yaml @@ -5,7 +5,7 @@ rules: deployment: param(deployment) prefix: wildfly.session. type: counter - unit: 1 + unit: "1" mapping: sessionsCreated: activeSessions: @@ -18,7 +18,7 @@ rules: listener: param(http-listener) prefix: wildfly.request. type: counter - unit: 1 + unit: "1" mapping: requestCount: processingTime: @@ -42,7 +42,7 @@ rules: metricAttribute: direction: const(in) - bean: jboss.as:subsystem=datasources,data-source=*,statistics=pool - unit: 1 + unit: "1" metricAttribute: data_source: param(data-source) mapping: