-
Notifications
You must be signed in to change notification settings - Fork 954
Jmx unit semconv alignment - Tomcat #13650
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
base: main
Are you sure you want to change the base?
Jmx unit semconv alignment - Tomcat #13650
Conversation
…nstrumentation into yaml-jmx-metrics-test
instrumentation/jmx-metrics/library/src/main/resources/jmx/rules/tomcat.yaml
Show resolved
Hide resolved
instrumentation/jmx-metrics/library/src/main/resources/jmx/rules/tomcat.yaml
Outdated
Show resolved
Hide resolved
instrumentation/jmx-metrics/library/src/main/resources/jmx/rules/tomcat.yaml
Outdated
Show resolved
Hide resolved
Tomcat metrics description md file moved to library Code review followup
@@ -32,7 +38,6 @@ class JmxMetricInsightInstallerTest { | |||
"hadoop.yaml", | |||
"jetty.yaml", | |||
"kafka-broker.yaml", | |||
"tomcat.yaml", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[for reviewer] Tomcat metrics definition is tested in a much better way in TomcatIntegrationTest.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By "much better way" here it means being tested against a real tomcat instance rather than trying to parse the yaml file to see if there are any errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moreover, it can now be easily tested with multiple tomcat versions
instrumentation/jmx-metrics/library/src/main/resources/jmx/rules/tomcat.yaml
Show resolved
Hide resolved
@robsunday #13597 has been merged, so you can update with current state of |
sourceUnit: ms | ||
unit: s | ||
desc: The longest request processing time. | ||
processingTime: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that processingTime
and maxTime
mbean attributes are related, so we should probably make sure their name reflect that, for example:
tomcat.request.max.time
formaxTime
+tomcat.request.total.time
forprocessingTime
- having the
total
ormax
not at the end of the metric name helps to avoid the "do not use total" rule in semconv - alternatively, we could argue that the "do not use total" rule in semconv refers only to the
_total
and nottotal
suffix and then usetomcat.request.time.max
andtomcat.request.time.total
but this might be harder to make people agree on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mapped maxTime
to tomcat.request.duration.max
to make it similar to one of http semconv metrics
I'd keep this name, and i could then map processingTime
to tomcat.request.duration.total
I think .total
suffix is fine because semconv rule you mentioned is talking specifically about _total
suffix, not .total
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be worth to ask and double-check in the SIG meeting if .total
could be fine as suffix, because if it does then it sounds like a good strategy that would be consistent with other "pre-aggregated metrics", for example it's easy to add an tomcat.request.duration.max
instrumentation/jmx-metrics/library/src/main/resources/jmx/rules/tomcat.yaml
Outdated
Show resolved
Hide resolved
instrumentation/jmx-metrics/library/src/main/resources/jmx/rules/tomcat.yaml
Outdated
Show resolved
Hide resolved
instrumentation/jmx-metrics/library/src/main/resources/jmx/rules/tomcat.yaml
Show resolved
Hide resolved
…es/tomcat.yaml Co-authored-by: SylvainJuge <[email protected]>
…es/tomcat.yaml Co-authored-by: SylvainJuge <[email protected]>
sourceUnit: ms | ||
unit: s | ||
desc: The longest request processing time. | ||
processingTime: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be worth to ask and double-check in the SIG meeting if .total
could be fine as suffix, because if it does then it sounds like a good strategy that would be consistent with other "pre-aggregated metrics", for example it's easy to add an tomcat.request.duration.max
- Tomcat:type=GlobalRequestProcessor,name=* | ||
prefix: tomcat. | ||
metricAttribute: | ||
tomcat.request_processor.name: param(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the processor name, I think we could maybe use tomcat.request.processor.name
as it allows to reuse the tomcat.request
namespace, and as I understand defining more namespaces than strictly needed in semconv and avoiding _
is the current strategy, even if we don't have anything extra to provide in the tomcat.request.processor
name yet.
tomcat.request.processing_time changed to tomcat.request.duration.total
Changes:
agent
tolibrary
folder to make it reusable in alllibrary
dependants