-
Notifications
You must be signed in to change notification settings - Fork 1k
align wildfly metrics with semconv #14208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 30 commits
6ebcf90
5bd74ca
965e541
f57d108
989e04a
ebf0788
81a82c1
9727eb2
d347336
c5f4e0e
397ee85
3764a0e
c161fb5
f916b4b
6b75e06
b7ba13d
495eca5
c502b79
998cef7
05974a0
4ee825a
a30e91d
d024a03
f67f2b9
6f7c271
c1a1652
3334081
3dd8e38
ba56971
16b4165
6ed598d
abc2bba
531f836
db7c8a3
3d1c2cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,147 @@ | ||
| --- | ||
| rules: | ||
|
|
||
| - bean: jboss.as:deployment=*,subsystem=undertow | ||
| prefix: wildfly.session. | ||
| metricAttribute: | ||
| wildfly.deployment: param(deployment) | ||
| unit: "{session}" | ||
| mapping: | ||
| # wildfly.session.created | ||
| sessionsCreated: | ||
| metric: created | ||
| type: counter | ||
| desc: The number of sessions created | ||
| # wildfly.session.active.count | ||
| activeSessions: | ||
| metric: active.count | ||
| type: updowncounter | ||
| desc: The number of active sessions | ||
| # wildfly.session.active.limit | ||
| maxActiveSessions: | ||
| metric: active.limit | ||
| type: updowncounter | ||
| desc: The maximum number of active sessions | ||
| # discard negative values used to indicate absence of limit | ||
| dropNegativeValues: true | ||
| # wildfly.session.expired | ||
| expiredSessions: | ||
| metric: expired | ||
| type: counter | ||
| desc: The number of expired sessions | ||
| # wildfly.session.rejected | ||
| rejectedSessions: | ||
| metric: rejected | ||
| type: counter | ||
| desc: The number of rejected sessions | ||
|
|
||
| - bean: jboss.as:subsystem=undertow,server=*,http-listener=* | ||
| prefix: wildfly. | ||
| metricAttribute: | ||
| wildfly.server: param(server) | ||
| wildfly.listener: param(http-listener) | ||
| type: counter | ||
| mapping: | ||
| # wildfly.request.count | ||
| requestCount: | ||
| metric: request.count | ||
| unit: "{request}" | ||
| desc: The number of requests served | ||
| # wildfly.request.duration.sum | ||
| processingTime: | ||
| metric: request.duration.sum | ||
| sourceUnit: ns | ||
| unit: s | ||
| desc: The total amount of time spent processing requests | ||
| # wildfly.error.count | ||
| errorCount: | ||
| metric: error.count | ||
| unit: "{request}" | ||
| desc: The number of requests that have resulted in a 5xx response | ||
|
|
||
| # wildly.network.io | ||
| - bean: jboss.as:subsystem=undertow,server=*,http-listener=* | ||
| metricAttribute: | ||
| wildfly.server: param(server) | ||
| wildfly.listener: param(http-listener) | ||
| type: counter | ||
| unit: By | ||
| mapping: | ||
| bytesSent: | ||
| metric: &metric wildfly.network.io | ||
| desc: &desc Total number of bytes transferred | ||
| metricAttribute: | ||
| network.io.direction: const(transmit) | ||
| bytesReceived: | ||
| metric: *metric | ||
| desc: *desc | ||
| metricAttribute: | ||
| network.io.direction: const(receive) | ||
|
|
||
| - bean: jboss.as:subsystem=datasources,data-source=*,statistics=pool | ||
| prefix: wildfly.db.client.connection. | ||
| metricAttribute: | ||
| db.client.connection.pool.name: param(data-source) | ||
| mapping: | ||
| # wildfly.db.client.connection.count | ||
| ActiveCount: | ||
| metric: &metric count | ||
| type: &type updowncounter | ||
| unit: &unit "{connection}" | ||
| desc: &desc The number of open physical database connections | ||
| metricAttribute: | ||
| db.client.connection.state: const(used) | ||
| IdleCount: | ||
| metric: *metric | ||
| type: *type | ||
| unit: *unit | ||
| desc: *desc | ||
| metricAttribute: | ||
| db.client.connection.state: const(idle) | ||
| # wildfly.db.client.connection.wait.count | ||
| WaitCount: | ||
| metric: wait.count | ||
| type: counter | ||
| # In this context, 'request' means 'connection request' | ||
| unit: "{request}" | ||
| desc: The number of connection requests that had to wait to obtain it | ||
|
|
||
| - bean: jboss.as:subsystem=transactions | ||
| prefix: wildfly.transaction. | ||
| unit: "{transaction}" | ||
| mapping: | ||
| # wildfly.transaction.count | ||
| numberOfInflightTransactions: | ||
| metric: count | ||
| type: updowncounter | ||
| desc: The number of in-flight transactions | ||
| # wildfly.transaction.created | ||
| numberOfTransactions: | ||
| metric: created | ||
| type: counter | ||
| desc: The total number of transactions created | ||
| # wildfly.transaction.committed | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd prefer having
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's something that I really considered doing, however adding the
The way I understand the semconv specification here is that we could use
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm still not 100% convinced, but this is just my personal preference to keep metric names as explicit as possible. And according to the example you brought up:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As another point of reference the JVM metrics, which happen to be the only ones that are currently part of semconv tend to only use the
And in the case of memory buffers we already have a case where we have "distinct depths" in the same namespace:
|
||
| numberOfCommittedTransactions: | ||
| metric: committed | ||
| type: counter | ||
| desc: The total number of transactions committed | ||
| # wildfly.transaction.rollback | ||
| numberOfApplicationRollbacks: | ||
| metric: &metric rollback | ||
| type: &type counter | ||
| metricAttribute: | ||
| wildfly.rollback.cause: const(application) | ||
| desc: &desc The total number of transactions rolled back | ||
| numberOfResourceRollbacks: | ||
| metric: *metric | ||
| type: *type | ||
| metricAttribute: | ||
| wildfly.rollback.cause: const(resource) | ||
| desc: *desc | ||
| numberOfSystemRollbacks: | ||
| metric: *metric | ||
| type: *type | ||
| metricAttribute: | ||
| wildfly.rollback.cause: const(system) | ||
| desc: *desc | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.