Add support for dw-metrics 4.x#1228
Add support for dw-metrics 4.x#1228zeitlinger merged 3 commits intoprometheus:mainprometheus/client_java:mainfrom kingster:prometheus-metrics-instrumentation-dropwizard-4xkingster/client_java:prometheus-metrics-instrumentation-dropwizard-4xCopy head branch name to clipboard
Conversation
2e0b416 to
fa85d06
Compare
|
Hi @fstab Please do review this PR, this solves for Dropwizard 4.x metrics support. |
zeitlinger
left a comment
There was a problem hiding this comment.
Thanks for the contribution 😄
There was a problem hiding this comment.
test dependencies are added in the parent already:
Lines 103 to 143 in 9a0848d
There was a problem hiding this comment.
Sure, removed these.
There was a problem hiding this comment.
should only depend on prometheus-metrics-exposition-textformats
There was a problem hiding this comment.
Sure, changed this.
There was a problem hiding this comment.
please use assertj for all assertions
There was a problem hiding this comment.
Thanks for pointing this out. Fixed this
There was a problem hiding this comment.
It works, just that its not a string comparison, hence this comment is to explain why its not asserted like in other cases.
There was a problem hiding this comment.
can you test it like here:
?There was a problem hiding this comment.
I think doing it that way will lead to a flaky test-suite, because the problem is in the dw metrics4 histogram. This is something that had happened earlier and that is specially why this approach was taken.
I took reference of this method from the dw5 implementation.
There was a problem hiding this comment.
Updated the pr to use
assertThat(textFormat)
.satisfiesAnyOf(
text -> assertThat(text).isEqualTo(expected1),
text -> assertThat(text).isEqualTo(expected2));
So that it matches the exact output, and is a much simpler test.
a07277c to
13c320c
Compare
Signed-off-by: Kinshuk Bairagi <hi@kinsh.uk>
13c320c to
529676e
Compare
|
@zeitlinger Have made the changes as requested, could you please have a look again? |
Signed-off-by: Kinshuk Bairagi <hi@kinsh.uk>
|
Thank you @zeitlinger Are snapshot versions published at any repository? If not when is the next planned version release? |
1.3.5 has just been released 😄 |
Adding support for
com.codahale.metrics.MetricRegistry(Dropwizard Metrics 4.x)Completes #867