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: prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/DefaultHandler.java
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,7 @@ public class DefaultHandler implements HttpHandler {
Copy file name to clipboardExpand all lines: prometheus-metrics-instrumentation-dropwizard5/src/test/java/io/prometheus/metrics/instrumentation/dropwizard5/DropwizardExportsTest.java
+60-52Lines changed: 60 additions & 52 deletions
Original file line number
Diff line number
Diff line change
@@ -31,10 +31,12 @@ public void setUp() {
31
31
publicvoidtestCounter() {
32
32
metricRegistry.counter("foo.bar").inc(1);
33
33
Stringexpected =
34
-
"# TYPE foo_bar counter\n"
35
-
+ "# HELP foo_bar Generated from Dropwizard metric import (metric=foo.bar, type=io.dropwizard.metrics5.Counter)\n"
36
-
+ "foo_bar_total 1.0\n"
37
-
+ "# EOF\n";
34
+
"""
35
+
# TYPE foo_bar counter
36
+
# HELP foo_bar Generated from Dropwizard metric import (metric=foo.bar, type=io.dropwizard.metrics5.Counter)
+ "# HELP boolean_gauge Generated from Dropwizard metric import (metric=boolean.gauge, type=io.prometheus.metrics.instrumentation.dropwizard5.DropwizardExportsTest$5)\n"
90
-
+ "boolean_gauge 1.0\n"
91
-
+ "# TYPE double_gauge gauge\n"
92
-
+ "# HELP double_gauge Generated from Dropwizard metric import (metric=double.gauge, type=io.prometheus.metrics.instrumentation.dropwizard5.DropwizardExportsTest$2)\n"
93
-
+ "double_gauge 1.234\n"
94
-
+ "# TYPE float_gauge gauge\n"
95
-
+ "# HELP float_gauge Generated from Dropwizard metric import (metric=float.gauge, type=io.prometheus.metrics.instrumentation.dropwizard5.DropwizardExportsTest$4)\n"
96
-
+ "float_gauge 0.1234000027179718\n"
97
-
+ "# TYPE integer_gauge gauge\n"
98
-
+ "# HELP integer_gauge Generated from Dropwizard metric import (metric=integer.gauge, type=io.prometheus.metrics.instrumentation.dropwizard5.DropwizardExportsTest$1)\n"
99
-
+ "integer_gauge 1234.0\n"
100
-
+ "# TYPE long_gauge gauge\n"
101
-
+ "# HELP long_gauge Generated from Dropwizard metric import (metric=long.gauge, type=io.prometheus.metrics.instrumentation.dropwizard5.DropwizardExportsTest$3)\n"
102
-
+ "long_gauge 1234.0\n"
103
-
+ "# EOF\n";
90
+
"""
91
+
# TYPE boolean_gauge gauge
92
+
# HELP boolean_gauge Generated from Dropwizard metric import (metric=boolean.gauge, type=io.prometheus.metrics.instrumentation.dropwizard5.DropwizardExportsTest$5)
93
+
boolean_gauge 1.0
94
+
# TYPE double_gauge gauge
95
+
# HELP double_gauge Generated from Dropwizard metric import (metric=double.gauge, type=io.prometheus.metrics.instrumentation.dropwizard5.DropwizardExportsTest$2)
96
+
double_gauge 1.234
97
+
# TYPE float_gauge gauge
98
+
# HELP float_gauge Generated from Dropwizard metric import (metric=float.gauge, type=io.prometheus.metrics.instrumentation.dropwizard5.DropwizardExportsTest$4)
99
+
float_gauge 0.1234000027179718
100
+
# TYPE integer_gauge gauge
101
+
# HELP integer_gauge Generated from Dropwizard metric import (metric=integer.gauge, type=io.prometheus.metrics.instrumentation.dropwizard5.DropwizardExportsTest$1)
102
+
integer_gauge 1234.0
103
+
# TYPE long_gauge gauge
104
+
# HELP long_gauge Generated from Dropwizard metric import (metric=long.gauge, type=io.prometheus.metrics.instrumentation.dropwizard5.DropwizardExportsTest$3)
# HELP my_application_namedCounter1 Generated from Dropwizard metric import (metric=my.application.namedCounter1, type=io.dropwizard.metrics5.Counter)
258
+
my_application_namedCounter1_total 0.0
259
+
# TYPE my_application_namedGauge1 gauge
260
+
# HELP my_application_namedGauge1 Generated from Dropwizard metric import (metric=my.application.namedGauge1, type=io.prometheus.metrics.instrumentation.dropwizard5.DropwizardExportsTest$ExampleDoubleGauge)
261
+
my_application_namedGauge1 0.0
262
+
# TYPE my_application_namedHistogram1 summary
263
+
# HELP my_application_namedHistogram1 Generated from Dropwizard metric import (metric=my.application.namedHistogram1, type=io.dropwizard.metrics5.Histogram)
Copy file name to clipboardExpand all lines: prometheus-metrics-instrumentation-dropwizard5/src/test/java/io/prometheus/metrics/instrumentation/dropwizard5/labels/CustomLabelMapperTest.java
+36-24Lines changed: 36 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -44,10 +44,12 @@ public void test_WHEN_NoMatches_THEN_ShouldReturnDefaultSample() {
# TYPE app_okhttpclient_client_HttpClient_service counter
49
+
# HELP app_okhttpclient_client_HttpClient_service Generated from Dropwizard metric import (metric=app.okhttpclient.client.HttpClient.service.total, type=io.dropwizard.metrics5.Counter)
# HELP app_okhttpclient_client_HttpClient Generated from Dropwizard metric import (metric=app.okhttpclient.client.HttpClient.greatService.total, type=io.dropwizard.metrics5.Counter)
# HELP app_okhttpclient_client_HttpClient Generated from Dropwizard metric import (metric=app.okhttpclient.client.HttpClient.greatService.total, type=io.dropwizard.metrics5.Counter)
# HELP app_okhttpclient_client_HttpClient Generated from Dropwizard metric import (metric=app.okhttpclient.client.HttpClient.greatService.400, type=io.dropwizard.metrics5.Counter)
# TYPE app_okhttpclient_client_HttpClient_greatService counter
181
+
# HELP app_okhttpclient_client_HttpClient_greatService Generated from Dropwizard metric import (metric=app.okhttpclient.client.HttpClient.greatService.400, type=io.dropwizard.metrics5.Counter)
# TYPE app_okhttpclient_client_HttpClient_greatService counter
210
+
# HELP app_okhttpclient_client_HttpClient_greatService Generated from Dropwizard metric import (metric=app.okhttpclient.client.HttpClient.greatService.400, type=io.dropwizard.metrics5.Counter)
Copy file name to clipboardExpand all lines: prometheus-metrics-instrumentation-guava/src/test/java/io/prometheus/metrics/instrumentation/guava/CacheMetricsCollectorTest.java
+18-16Lines changed: 18 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -52,22 +52,24 @@ public void cacheExposesMetricsForHitMissAndEviction() {
Copy file name to clipboardExpand all lines: prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/JvmBufferPoolMetricsTest.java
+17-15Lines changed: 17 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -42,21 +42,23 @@ public void testGoodCase() throws IOException {
42
42
MetricSnapshotssnapshots = registry.scrape();
43
43
44
44
Stringexpected =
45
-
"# TYPE jvm_buffer_pool_capacity_bytes gauge\n"
46
-
+ "# UNIT jvm_buffer_pool_capacity_bytes bytes\n"
47
-
+ "# HELP jvm_buffer_pool_capacity_bytes Bytes capacity of a given JVM buffer pool.\n"
0 commit comments