Skip to content

Conversation

michalvavrik
Copy link
Member

This comment has been minimized.

Copy link

github-actions bot commented Nov 7, 2024

🙈 The PR is closed and the preview is expired.

This comment has been minimized.

@michalvavrik
Copy link
Member Author

Interesting that MicrometerWebSocketsOnBinaryMessageTest.testClientEndpoint_MultiTextReceived_MultiTextSent is flaky. IIRC I cut down timeout to match the timeout used by WS Next OTel tests. Either I need to increase it or tune some setting. I'll have a look when I will be addressing reviewer requests for change.

Copy link
Contributor

@mkouba mkouba left a 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...

@michalvavrik michalvavrik force-pushed the feature/ws-next-micrometer-integration branch from eb5f127 to 562ab3b Compare November 12, 2024 12:30

This comment has been minimized.

This comment has been minimized.

@michalvavrik
Copy link
Member Author

Ah, I forgot about that flakiness (it never fails locally), I'll address it now.

@michalvavrik michalvavrik force-pushed the feature/ws-next-micrometer-integration branch from 562ab3b to b1269be Compare November 12, 2024 13:31

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";
Copy link
Contributor

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).

Copy link
Member Author

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.

Copy link
Member Author

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";
Copy link
Contributor

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"??

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@michalvavrik michalvavrik force-pushed the feature/ws-next-micrometer-integration branch from 8d87601 to 76e4130 Compare November 18, 2024 14:15

This comment has been minimized.

@michalvavrik
Copy link
Member Author

michalvavrik commented Nov 18, 2024

It's bit difficult as MicrometerWebSocketsOnTextMessageTest haven't failed locally yet, but I'll try to read code in next 2 days and figure why it could be flaky. There is probably wrong expected count somewhere.

This comment has been minimized.

@mkouba
Copy link
Contributor

mkouba commented Nov 18, 2024

It's bit difficult as MicrometerWebSocketsOnTextMessageTest haven't failed locally yet, but I'll try to read code in next 2 days and figure why it could be flaky. There is probably wrong expected count somewhere.

I can try it locally too...

@michalvavrik michalvavrik force-pushed the feature/ws-next-micrometer-integration branch from 37f14de to d82340b Compare November 19, 2024 09:39
Copy link

quarkus-bot bot commented Nov 19, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit d82340b.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

Copy link

quarkus-bot bot commented Nov 19, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit d82340b.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@mkouba
Copy link
Contributor

mkouba commented Nov 19, 2024

This PR is ready for merge from my point of view! Let's wait for @brunobat though.

@mkouba
Copy link
Contributor

mkouba commented Nov 21, 2024

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

@michalvavrik
Copy link
Member Author

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.

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.

@michalvavrik
Copy link
Member Author

address this last thing in a follow-up.

yeah, that part alone can be done easily separately

Copy link
Contributor

@brunobat brunobat left a 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.

@michalvavrik
Copy link
Member Author

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.
Do you think this could be moved in the future?

If I unseal SendingInterceptor, ErrorCountingInterceptor and ConnectionInterceptor, then moving it should be as easy as moving this code to the quarkus-micrometer and adding conditional WS-Next dependency to quarkus-micrometer or introducing runtime SPI. Same should be true for the OTel integration because I believe there is no tight coupling. I am happy to do that, but maybe it would be easier if we got this in and follow up with moving the code and IT?

Copy link
Contributor

@brunobat brunobat left a 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 !

@brunobat brunobat merged commit b09dbf3 into quarkusio:main Nov 21, 2024
23 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.18 - main milestone Nov 21, 2024
@quarkus-bot quarkus-bot bot added the kind/enhancement New feature or request label Nov 21, 2024
@brunobat
Copy link
Contributor

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.
Do you think this could be moved in the future?

If I unseal SendingInterceptor, ErrorCountingInterceptor and ConnectionInterceptor, then moving it should be as easy as moving this code to the quarkus-micrometer and adding conditional WS-Next dependency to quarkus-micrometer or introducing runtime SPI. Same should be true for the OTel integration because I believe there is no tight coupling. I am happy to do that, but maybe it would be easier if we got this in and follow up with moving the code and IT?

Deal!

@mkouba
Copy link
Contributor

mkouba commented Nov 21, 2024

and adding conditional WS-Next dependency to quarkus-micrometer

👎

or introducing runtime SPI.

👍

@michalvavrik michalvavrik deleted the feature/ws-next-micrometer-integration branch November 21, 2024 17:02
mjurc added a commit to mjurc/quarkus-test-suite that referenced this pull request Apr 16, 2025
mjurc added a commit to mjurc/quarkus-test-suite that referenced this pull request Apr 16, 2025
mjurc added a commit to mjurc/quarkus-test-suite that referenced this pull request Apr 16, 2025
mjurc added a commit to mjurc/quarkus-test-suite that referenced this pull request Apr 16, 2025
mjurc added a commit to mjurc/quarkus-test-suite that referenced this pull request Apr 17, 2025
mjurc added a commit to mjurc/quarkus-test-suite that referenced this pull request Apr 17, 2025
michalvavrik pushed a commit to quarkus-qe/quarkus-test-suite that referenced this pull request Apr 17, 2025
mjurc added a commit to mjurc/quarkus-test-suite that referenced this pull request Apr 17, 2025
michalvavrik pushed a commit to quarkus-qe/quarkus-test-suite that referenced this pull request Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebSockets Next: OTel integration

4 participants