You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instrumentation/jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/engine/MetricInfo.java
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,9 @@ public class MetricInfo {
19
19
publicenumType {
20
20
COUNTER,
21
21
UPDOWNCOUNTER,
22
-
GAUGE
22
+
GAUGE,
23
+
/** state metric captured as updowncounter */
24
+
STATE
23
25
}
24
26
25
27
// How to report the metric using OpenTelemetry API
Copy file name to clipboardExpand all lines: instrumentation/jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/engine/MetricRegistrar.java
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,13 @@ void enrollExtractor(
120
120
}
121
121
logger.log(INFO, "Created Gauge for {0}", metricName);
122
122
}
123
+
break;
124
+
// CHECKSTYLE:OFF
125
+
caseSTATE:
126
+
{
127
+
// CHECKSTYLE:ON
128
+
thrownewIllegalStateException("state metrics should not be registered");
Copy file name to clipboardExpand all lines: instrumentation/jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/yaml/MetricStructure.java
+59-25Lines changed: 59 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -20,22 +20,29 @@
20
20
* <li>the metric attributes
21
21
* <li>the unit
22
22
*
23
-
* <p>Known subclasses are {@link JmxRule} and {@link Metric}.
23
+
* <p>Known subclasses are {@link JmxRule} and {@link Metric}.
Copy file name to clipboardExpand all lines: instrumentation/jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/yaml/RuleParser.java
Copy file name to clipboardExpand all lines: instrumentation/jmx-metrics/library/src/test/java/io/opentelemetry/instrumentation/jmx/engine/RuleParserTest.java
0 commit comments