Skip to content

Commit 57a552f

Browse files
committed
jetty sessions duration
1 parent 8b87c8f commit 57a552f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/target_systems/JettyIntegrationTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ protected void verifyMetrics() {
5656
"jetty.session.count",
5757
"The number of sessions established in total.",
5858
"{sessions}",
59+
attrs -> attrs.containsKey("resource")),
60+
metric ->
61+
assertSumWithAttributes(
62+
metric,
63+
"jetty.session.time.total",
64+
"The total time sessions have been active.",
65+
"s",
5966
attrs -> attrs.containsKey("resource")));
6067
}
6168
}

jmx-scraper/src/main/resources/jetty.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ rules:
1212
type: counter
1313
unit: "{sessions}"
1414
desc: The number of sessions established in total.
15+
sessionTimeTotal:
16+
metric: time.total
17+
type: counter
18+
unit: s
19+
desc: The total time sessions have been active.

0 commit comments

Comments
 (0)