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

[4.x] Fix incorrect tags comparison when trying to match metric IDs #5550

Merged
merged 1 commit into from Nov 29, 2022

Conversation

tjquinno
Copy link
Member

Resolves #5546

Forward-port of #5544 (see description there)

@tjquinno tjquinno self-assigned this Nov 29, 2022
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 29, 2022
Copy link
Member

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

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

Small comment (nit pick...), in general LGTM


Counter counter1 = store.getOrRegisterMetric(metadata, Counter.class, tags1);
Counter counter2 = store.getOrRegisterMetric(metadata, Counter.class, tags2);
assertThat("Counters with overlapping but different tags", counter1, not(is(counter2)));
Copy link
Member

Choose a reason for hiding this comment

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

I would use either is(not( or just not( so the assertion reads like English sentence:
"assert that counter1 is not counter2" seems easier to understand than "assert that counter1 not is counter2"

@tjquinno tjquinno merged commit 0590530 into helidon-io:main Nov 29, 2022
@tjquinno tjquinno deleted the metrics-tags-fix-4.x branch November 29, 2022 12:15
trentjeff pushed a commit to trentjeff/helidon that referenced this pull request Nov 29, 2022
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.

None yet

2 participants