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 - YAML config and integration test for HBase #1538

Merged
merged 10 commits into from
Nov 25, 2024

Conversation

robsunday
Copy link
Contributor

@robsunday robsunday commented Nov 12, 2024

  • Created YAML config for connecting JMX Insight to HBase created based on jmx-metrics groovy script
  • Updated jmx-metrics units to match semconv rules

"Hadoop:service=HBase,name=Master,sub=AssignmentManager" metrics are defined as updowncounter, while in my opinion it should be just gauges. I kept updowncounters to minimize incompatibilities.
We may consider if updownocunters should be converted to gauges in this or the following PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

[for reviewer] Some small improvements to report meaningful errors for few failed assertions

@robsunday robsunday changed the title YAML config andf integration test for HBase YAML config and integration test for HBase Nov 14, 2024
@robsunday robsunday changed the title YAML config and integration test for HBase JMX Scraper - YAML config and integration test for HBase Nov 14, 2024
metric: region.count
unit: "{region}"
desc: The number of regions hosted by the region server.

Copy link
Contributor

Choose a reason for hiding this comment

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

[minor] the spacing between blocks is intentional to keep things a bit readable here, maybe adding an explicit "header comment" with for example the metric name/prefix/suffix would help to understand this is intentional and needs to be preserved when maintaining this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comments added

Comment on lines +166 to +180
Append_99th_percentile:
metric: operation.append.latency.p99
desc: Append operation 99th Percentile latency.
Append_max:
metric: operation.append.latency.max
desc: Append operation max latency.
Append_min:
metric: operation.append.latency.min
desc: Append operation minimum latency.
Append_mean:
metric: operation.append.latency.mean
desc: Append operation mean latency.
Append_median:
metric: operation.append.latency.median
desc: Append operation median latency.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not related to this PR, but I am pretty sure those are metrics created with dropwizard, we need to make sure those are mapped consistently for every supported system where they are used. The downside of those here is that there is no way for us to translate that easily to an otel histogram as we don't have access to the individual samples.

@github-actions github-actions bot requested a review from SylvainJuge November 21, 2024 08:48
@@ -7,6 +7,7 @@ rules:
unit: "{server}"
type: updowncounter
mapping:
# Group of properties to build hbase.master.region_server.count metric
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Group of properties to build hbase.master.region_server.count metric
# hbase.master.region_server.count

[nitpicking] Maybe simplify this even further as everything here is a metric (and do the same with others that match Group of properties to build .* metric regex)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@github-actions github-actions bot requested a review from SylvainJuge November 22, 2024 12:07
@@ -16,45 +16,45 @@

def beanMasterServer = otel.mbeans("Hadoop:service=HBase,name=Master,sub=Server")
otel.instrument(beanMasterServer, "hbase.master.region_server.count",
"The number of region servers.", "{servers}",
"The number of region servers.", "{server}",
Copy link
Member

Choose a reason for hiding this comment

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

I'm probably misremembering, but I thought the plan was to not change things in the existing jmx-metrics component, and fix them only in the jmx-scraper implementation?

Copy link
Contributor

Choose a reason for hiding this comment

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

That was our initial plan, however we (or at least I) changed a bit our mind about it for units because:

  • units is just metadata, the values captured remain the same and it's quite unlikely any implementation strongly relies on those values (for example, it might break some UI/i18n, but the values remain the same). Changing the metric or its attribute names would not be the same minor impact.
  • the semconv conventions about this are stable, thus those changes will eventually have to be done at some point, and this makes one less difference to deal with when enhancing the mappings later.

We already did similar changes with other JMX scraper PRs, for example:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I may only add that this change should be perfectly safe since the only changes were made in unit annotations that are discarded by the parsers anyway (according to these docs).

Copy link
Member

Choose a reason for hiding this comment

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

makes sense, thanks!

@trask trask merged commit 1d7f482 into open-telemetry:main Nov 25, 2024
14 checks passed
@robsunday robsunday deleted the integration-test-hbase branch December 5, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants