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

Restore percentile and bucket data to JSON metrics output #7849

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

tjquinno
Copy link
Member

Description

Resolves #7848

I had to rewrite the JSON metrics output code for 4.x but accidentally omitted the percentile and bucket output. (It's fine in the Prometheus/OpenMetrics output because we rely on the Micrometer Prometheus meter registry for that in 4.x.)

This PR adds the missing output back.

Documentation

No impact (outside of already-in-progress metrics doc revs).

@tjquinno tjquinno self-assigned this Oct 19, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 19, 2023
@@ -471,6 +475,42 @@ protected void apply(JsonObjectBuilder builder) {
builder.add(meterId.name(), sameNameBuilder);
}

private void addDetails(HistogramSnapshot snapshot, Meter.Id childId, TimeUnit timeUnit) {
snapshot.percentileValues().forEach(vap ->
sameNameBuilder
Copy link
Member

Choose a reason for hiding this comment

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

IMO, all these new lines don't make this code fragment more readable. I would make this code a bit less sparse.

@tjquinno tjquinno linked an issue Oct 19, 2023 that may be closed by this pull request
@tjquinno tjquinno merged commit d836f91 into helidon-io:main Oct 19, 2023
@tjquinno tjquinno deleted the 4.x-json-output-fix branch October 19, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.x Metrics JSON output lacks percentile and bucket entries
2 participants