-
Notifications
You must be signed in to change notification settings - Fork 3k
Integrate Micrometer with WebSockets Next #44379
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
Integrate Micrometer with WebSockets Next #44379
Conversation
michalvavrik
commented
Nov 7, 2024
- closes: WebSockets Next: OTel integration #39143
This comment has been minimized.
This comment has been minimized.
🙈 The PR is closed and the preview is expired. |
This comment has been minimized.
This comment has been minimized.
Interesting that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good and the test coverage is really impressive...
...t/runtime/src/main/java/io/quarkus/websockets/next/runtime/telemetry/SendingInterceptor.java
Outdated
Show resolved
Hide resolved
...t/runtime/src/main/java/io/quarkus/websockets/next/runtime/telemetry/SendingInterceptor.java
Outdated
Show resolved
Hide resolved
...-next/deployment/src/main/java/io/quarkus/websockets/next/deployment/WebSocketProcessor.java
Outdated
Show resolved
Hide resolved
...t/runtime/src/main/java/io/quarkus/websockets/next/runtime/telemetry/SendingInterceptor.java
Outdated
Show resolved
Hide resolved
eb5f127
to
562ab3b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Ah, I forgot about that flakiness (it never fails locally), I'll address it now. |
562ab3b
to
b1269be
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b1269be
to
8d87601
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/** | ||
* Counts all the WebSockets server endpoint errors. | ||
*/ | ||
public static final String SERVER_MESSAGES_COUNT_ERRORS = "quarkus.websockets.server.messages.count.errors"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should be something like SERVER_ENDPOINT_COUNT_ERRORS = "quarkus.websockets.server.endpoint.count.errors"
instead because it's not only about messages but about endpoint logic in general (IIUIC it mirros the @OnError
functionality).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree with that. I think I called it differently before but changed it based on suggestions. They are not only error messages. I'll change it. We will see what @brunobat thinks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
/** | ||
* Counts all the WebSockets client endpoint errors. | ||
*/ | ||
public static final String CLIENT_MESSAGES_COUNT_ERRORS = "quarkus.websockets.client.messages.count.errors"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLIENT_ENDPOINT_COUNT_ERRORS = "quarkus.websockets.client.endpoint.count.errors"
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
...t/runtime/src/main/java/io/quarkus/websockets/next/runtime/telemetry/TelemetryConstants.java
Outdated
Show resolved
Hide resolved
...nsions/websockets-next/runtime/src/main/java/io/quarkus/websockets/next/TelemetryConfig.java
Show resolved
Hide resolved
...t/runtime/src/main/java/io/quarkus/websockets/next/runtime/telemetry/TelemetryConstants.java
Outdated
Show resolved
Hide resolved
8d87601
to
76e4130
Compare
This comment has been minimized.
This comment has been minimized.
It's bit difficult as |
This comment has been minimized.
This comment has been minimized.
I can try it locally too... |
37f14de
to
d82340b
Compare
Status for workflow
|
Status for workflow
|
This PR is ready for merge from my point of view! Let's wait for @brunobat though. |
If I understand it correctly the only thing we're waiting for is an integration test, right? If so, I'd like to merge this PR and address this last thing in a follow-up. WDYT? @brunobat @michalvavrik |
I am fighting with time, but I hope (once again) I could have time to add IT today (I also thought that yesterday :-D). Anyway, I think we are waiting for @brunobat review. Last time we talked Bruno was testing this PR locally and told me he needs more time. |
yeah, that part alone can be done easily separately |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I think the tests are very thorough, however thay are also a bit opaque because of the methods inside MetricsAsserter
. Future debugging, might force us to refactor that.
To be fair, all this instrumentation should have been done in the quarkus-micrometer
project under io.quarkus.micrometer.runtime.binder
.
Same for OpenTelemetry.
We shouldn't be pulverising the extensions with micrometer and OTel libs because it will make maintenance a pain.
In any case, having the functionality is more important. Do you think this could be moved in the future?
What do you think @michalvavrik?
... And sorry for not thinking of this before.
If I unseal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for this @michalvavrik !
Deal! |
👎
👍 |
* Adding tests for Micrometer metrics exposed for WebSockets. Test plan: https://github.com/quarkus-qe/quarkus-test-plans/blob/main/QUARKUS-5667.md Feature issue: https://issues.redhat.com/browse/QUARKUS-5667 Code changes: quarkusio/quarkus#44379
* Adding tests for Micrometer metrics exposed for WebSockets. Test plan: https://github.com/quarkus-qe/quarkus-test-plans/blob/main/QUARKUS-5667.md Feature issue: https://issues.redhat.com/browse/QUARKUS-5667 Code changes: quarkusio/quarkus#44379
* Adding tests for Micrometer metrics exposed for WebSockets. Test plan: https://github.com/quarkus-qe/quarkus-test-plans/blob/main/QUARKUS-5667.md Feature issue: https://issues.redhat.com/browse/QUARKUS-5667 Code changes: quarkusio/quarkus#44379
* Adding tests for Micrometer metrics exposed for WebSockets. Test plan: https://github.com/quarkus-qe/quarkus-test-plans/blob/main/QUARKUS-5667.md Feature issue: https://issues.redhat.com/browse/QUARKUS-5667 Code changes: quarkusio/quarkus#44379
* Adding tests for Micrometer metrics exposed for WebSockets. Test plan: https://github.com/quarkus-qe/quarkus-test-plans/blob/main/QUARKUS-5667.md Feature issue: https://issues.redhat.com/browse/QUARKUS-5667 Code changes: quarkusio/quarkus#44379
* Adding tests for Micrometer metrics exposed for WebSockets. Test plan: https://github.com/quarkus-qe/quarkus-test-plans/blob/main/QUARKUS-5667.md Feature issue: https://issues.redhat.com/browse/QUARKUS-5667 Code changes: quarkusio/quarkus#44379
* Adding tests for Micrometer metrics exposed for WebSockets. Test plan: https://github.com/quarkus-qe/quarkus-test-plans/blob/main/QUARKUS-5667.md Feature issue: https://issues.redhat.com/browse/QUARKUS-5667 Code changes: quarkusio/quarkus#44379
* Adding tests for Micrometer metrics exposed for WebSockets. Test plan: https://github.com/quarkus-qe/quarkus-test-plans/blob/main/QUARKUS-5667.md Feature issue: https://issues.redhat.com/browse/QUARKUS-5667 Code changes: quarkusio/quarkus#44379
* Adding tests for Micrometer metrics exposed for WebSockets. Test plan: https://github.com/quarkus-qe/quarkus-test-plans/blob/main/QUARKUS-5667.md Feature issue: https://issues.redhat.com/browse/QUARKUS-5667 Code changes: quarkusio/quarkus#44379