Skip to content

Commit d347336

Browse files
committed
cleanup and update doc
1 parent 9727eb2 commit d347336

File tree

3 files changed

+27
-26
lines changed

3 files changed

+27
-26
lines changed

instrumentation/jmx-metrics/library/src/main/resources/jmx/rules/wildfly.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ rules:
1010
sessionsCreated:
1111
metric: created
1212
type: counter
13-
desc: The number of sessions created.
13+
desc: The number of sessions created
1414
activeSessions:
1515
metric: count
1616
type: updowncounter
17-
desc: The number of active sessions.
17+
desc: The number of active sessions
1818
expiredSessions:
1919
metric: expired
2020
type: counter
21-
desc: The number of expired sessions.
21+
desc: The number of expired sessions
2222
rejectedSessions:
2323
metric: rejected
2424
type: counter
25-
desc: The number of rejected sessions.
25+
desc: The number of rejected sessions
2626

2727
- bean: jboss.as:subsystem=undertow,server=*,http-listener=*
2828
prefix: wildfly.
@@ -34,7 +34,7 @@ rules:
3434
requestCount:
3535
metric: request.count
3636
unit: "{request}"
37-
desc: The number of requests received.
37+
desc: The number of requests received
3838
processingTime:
3939
metric: request.duration.sum
4040
sourceUnit: ns
@@ -81,6 +81,7 @@ rules:
8181
# WaitCount:
8282
# metric: wildfly.db.client.connections.WaitCount
8383
# type: counter
84+
8485
# - bean: jboss.as:subsystem=transactions
8586
# type: counter
8687
# prefix: wildfly.db.client.

instrumentation/jmx-metrics/library/src/test/java/io/opentelemetry/instrumentation/jmx/rules/WildflyTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,31 +64,31 @@ private static MetricsVerifier createMetricsVerifier() {
6464
metric ->
6565
metric
6666
.isCounter()
67-
.hasDescription("The number of sessions created.")
67+
.hasDescription("The number of sessions created")
6868
.hasUnit("{session}")
6969
.hasDataPointsWithOneAttribute(deploymentAttribute))
7070
.add(
7171
"wildfly.session.count",
7272
metric ->
7373
metric
7474
.isUpDownCounter()
75-
.hasDescription("The number of active sessions.")
75+
.hasDescription("The number of active sessions")
7676
.hasUnit("{session}")
7777
.hasDataPointsWithOneAttribute(deploymentAttribute))
7878
.add(
7979
"wildfly.session.expired",
8080
metric ->
8181
metric
8282
.isCounter()
83-
.hasDescription("The number of expired sessions.")
83+
.hasDescription("The number of expired sessions")
8484
.hasUnit("{session}")
8585
.hasDataPointsWithOneAttribute(deploymentAttribute))
8686
.add(
8787
"wildfly.session.rejected",
8888
metric ->
8989
metric
9090
.isCounter()
91-
.hasDescription("The number of rejected sessions.")
91+
.hasDescription("The number of rejected sessions")
9292
.hasUnit("{session}")
9393
.hasDataPointsWithOneAttribute(deploymentAttribute))
9494
// request metrics
@@ -97,23 +97,23 @@ private static MetricsVerifier createMetricsVerifier() {
9797
metric ->
9898
metric
9999
.isCounter()
100-
.hasDescription("The number of requests received.")
100+
.hasDescription("The number of requests received")
101101
.hasUnit("{request}")
102102
.hasDataPointsWithAttributes(serverListenerAttributes))
103103
.add(
104104
"wildfly.request.duration.sum",
105105
metric ->
106106
metric
107107
.isCounter()
108-
.hasDescription("The total amount of time spent processing requests.")
108+
.hasDescription("The total amount of time spent processing requests")
109109
.hasUnit("s")
110110
.hasDataPointsWithAttributes(serverListenerAttributes))
111111
.add(
112112
"wildfly.error.count",
113113
metric ->
114114
metric
115115
.isCounter()
116-
.hasDescription("The number of requests that have resulted in a 5xx response.")
116+
.hasDescription("The number of requests that have resulted in a 5xx response")
117117
.hasUnit("{request}")
118118
.hasDataPointsWithAttributes(serverListenerAttributes))
119119
// network io metrics

instrumentation/jmx-metrics/library/wildfly.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
Here is the list of metrics based on MBeans exposed by Wildfly.
44

5-
| Metric Name | Type | Attributes | Description |
6-
| -------------------------------------------------- | ------------- | ------------------ | ----------------------------------------------------------------------- |
7-
| wildfly.network.io | Counter | direction, server | Total number of bytes transferred |
8-
| wildfly.request.errorCount | Counter | server, listener | The number of 500 responses that have been sent by this listener |
9-
| wildfly.request.requestCount | Counter | server, listener | The number of requests this listener has served |
10-
| wildfly.request.processingTime | Counter | server, listener | The total processing time of all requests handed by this listener |
11-
| wildfly.session.expiredSession | Counter | deployment | Number of sessions that have expired |
12-
| wildfly.session.rejectedSessions | Counter | deployment | Number of rejected sessions |
13-
| wildfly.session.sessionsCreated | Counter | deployment | Total sessions created |
14-
| wildfly.session.activeSessions | UpDownCounter | deployment | Number of active sessions |
15-
| wildfly.db.client.connections.usage | Gauge | data_source, state | The number of open jdbc connections |
16-
| wildfly.db.client.connections.WaitCount | Counter | data_source | The number of requests that had to wait to obtain a physical connection |
17-
| wildfly.db.client.rollback.count | Counter | cause | The total number of transactions rolled back |
18-
| wildfly.db.client.transaction.NumberOfTransactions | Counter | | The total number of transactions (top-level and nested) created |
5+
| Metric Name | Type | Attributes | Description |
6+
|----------------------------------------------------|---------------|--------------------------------------|-------------------------------------------------------------------------|
7+
| wildfly.network.io | Counter | wildfly.server, network.io.direction | Total number of bytes transferred |
8+
| wildfly.error.count | Counter | wildfly.server, wildfly.listener | The number of requests that have resulted in a 5xx response |
9+
| wildfly.request.count | Counter | wildfly.server,wildfly.listener | The number of requests this listener has served |
10+
| wildfly.request.duration.sum | Counter | wildfly.server,wildfly.listener | The total amount of time spent processing requests |
11+
| wildfly.session.expired | Counter | wildfly.deployment | The number of expired sessions |
12+
| wildfly.session.rejected | Counter | wildfly.deployment | The number of rejected sessions |
13+
| wildfly.session.created | Counter | wildfly.deployment | The number of sessions created |
14+
| wildfly.session.count | UpDownCounter | wildfly.deployment | The number of active sessions |
15+
| wildfly.db.client.connections.usage | Gauge | data_source, state | The number of open jdbc connections |
16+
| wildfly.db.client.connections.WaitCount | Counter | data_source | The number of requests that had to wait to obtain a physical connection |
17+
| wildfly.db.client.rollback.count | Counter | cause | The total number of transactions rolled back |
18+
| wildfly.db.client.transaction.NumberOfTransactions | Counter | | The total number of transactions (top-level and nested) created |

0 commit comments

Comments
 (0)