Skip to content
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

[jmx-scraper] Assertions refactoring - Tomcat integration test converted #1589

Merged
merged 59 commits into from
Dec 11, 2024

Conversation

robsunday
Copy link
Contributor

@robsunday robsunday commented Dec 10, 2024

Description:

  1. Migrated Tomcat integration test to use the new assertion framework.
  2. Update units to match semconv.
  3. Update units and integration test in JMX Metrics Gatherer to be aligned with semconv and consistent with JMX Scraper .

Part of #1573

metric ->
metric
.hasDescription("The number of active sessions")
.hasUnit("sessions") // TODO: not aligned with semconv. Should be "{session}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like in the previous PRs where such units inconsistencies were found I think it's worth fixing them straight away as they aren't "breaking changes" most of the time and we will have to fix it at some point because it's now part of the stable semantic conventtions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So my understanding is that in this case it may be a kind of breaking change. This is not the annotation in curly braces that is supposed to be skipped by parser.
I've been hesitating if I should update it or not and finally decided to leave it, but if reviewers agree that it should be changed then I'll gladly update it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok to update it since we are updating units elsewhere (in OTel we've said changing units is breaking whether they're curly braces or not)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I'll make the fix then

metric ->
metric
.hasDescription("The number of errors encountered")
.hasUnit("errors") // TODO: not aligned with semconv. Should be "{error}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as previous comment.

metric ->
metric
.hasDescription("The number of bytes transmitted and received")
.hasUnit("by")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, however the same doubts apply here

metric ->
metric
.hasDescription("The total requests")
.hasUnit("requests") // TODO: not aligned with semconv. Should be "{request}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as previous, we'd better fix those units inconsistencies when we find them.

Copy link
Contributor

@SylvainJuge SylvainJuge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed today, for now we can leave the units as is as those are not in curly braces and we are not just changing from plural to singular form, same for bytes we can leave this inconsistency with a TODO and deal with it later. "Later" here means likely when we revisit those definitions and align with instrumentation.

@github-actions github-actions bot requested a review from SylvainJuge December 10, 2024 13:17
@trask trask merged commit 10efe16 into open-telemetry:main Dec 11, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants