-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
MeterFilter not invoked after "Upgrade micrometer to 1.13. Use prometheus simple client" #42800
Comments
/cc @brunobat (micrometer), @ebullient (micrometer) |
cc @brunobat |
I cannot run the test after checking out main, @ppalaga.
|
Sorry about that. Maybe the build of Quarkus CXF did not succeed? It is quite possible that the newest |
this works: |
The timer is getting cached and the |
Created this bug on the Micrometer side: micrometer-metrics/micrometer#5406 |
@ppalaga l just wrote this on the Micrometer side bug: micrometer-metrics/micrometer#5406 (comment) I'm not sure a MeterFilter should be used like that with dynamic content... Will this be a problem for CXF? |
I guess our test scenario could be rewritten in that way. I am not a Micrometer expert at all and I have no idea how much this kind of dynamic However, a purely formal standpoint should be that a minor upgrade of Micrometer should stay backwards compatible. Maybe @AndreasPetersen who filed quarkiverse/quarkus-cxf#947 has an opinion? |
Hello, thank you for pinging me. The In the case of quarkiverse/quarkus-cxf#947 the issue was on the HTTP client requests. We need some method of adding request specific content to the generated Micrometer Meter. If we can no longer use I hope this provides some useful information. :) |
I'm not sure I understand, @AndreasPetersen because this |
Ah, I haven't really looked into the failing test reported in this issue. In our use case, we only add tags to client filters, by checking the name of the meter in the |
Can you guys refactor that test and not use the |
@brunobat where can I find more info about static/dynamic MeterFilters on Quarkus? I have no idea what the difference is. |
This is kind of a definition that I invented. Apparently, It is not supposed to use |
Could you perhaps push them to make it a part of their official docs? Once there, it would be much easier to justify to our users that they should prefer HttpServerMetricsTagsContributor for dynamic scenarios. |
And we likely may need *ClientMetricsTagsContributor for the outbound flow as well. |
@ppalaga I did reach out to them and you can quote the issue I created there: micrometer-metrics/micrometer#5406 |
OK, I implemented a new CXF-like way to attach Tags to client and server requests: quarkiverse/quarkus-cxf#1497 I considered using ClientMetricsTagsContributor/HttpServerMetricsTagsContributor, but then realized that the QCXF metrics extension does not depend on quarkus-micrometer. There was no need to do so in the past and perhaps it also made it possible make our metrics extension supported before quarkus-micrometer was supported. Anyway, once we have both ClientMetricsTagsContributor and HttpServerMetricsTagsContributor I may implement using them as well. |
Having said that, I am hereby acking bacporting Micrometer 1.13 to Quarkus 3.15 |
@ppalaga are the tests now passing after your fix? |
Describe the bug
quarkus-cxf-integration-test-hc5 in Quarkus CXF is failing after bfaee7b
Expected behavior
The test should pass
Actual behavior
The test fails
How to Reproduce?
Observation 1
When bfaee7b is reverted in Quarkus, the test passes
Observation 2
With bfaee7b in place, the
MeterFilter.map()
method is called only oncehttps://github.com/quarkiverse/quarkus-cxf/blob/main/integration-tests/hc5/src/main/java/io/quarkiverse/cxf/hc5/it/MeterFilterProducer.java#L19-L29
It can be seen when a debug statement outputting requestScopedHeader.getHeaderValue() is placed in the method body.
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: