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

Set metrics name for Vertx based clients on mqtt rabbitmq and amqp #2034

Merged
merged 1 commit into from
Jan 9, 2023

Conversation

ozangunalp
Copy link
Collaborator

So that micrometer metrics will collect metrics for the client.

@ozangunalp ozangunalp force-pushed the vertx_clients_metrics_name branch from de9fe52 to 818e084 Compare January 6, 2023 13:38
@ozangunalp ozangunalp force-pushed the vertx_clients_metrics_name branch from 818e084 to 639e875 Compare January 6, 2023 14:06
@codecov-commenter
Copy link

Codecov Report

Merging #2034 (9616a5d) into main (46e36d3) will decrease coverage by 0.08%.
The diff coverage is 57.14%.

❗ Current head 9616a5d differs from pull request most recent head 639e875. Consider uploading reports for the commit 639e875 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #2034      +/-   ##
============================================
- Coverage     77.25%   77.17%   -0.09%     
- Complexity     3466     3468       +2     
============================================
  Files           294      294              
  Lines         11652    11662      +10     
  Branches       1487     1490       +3     
============================================
- Hits           9002     9000       -2     
- Misses         1954     1961       +7     
- Partials        696      701       +5     
Impacted Files Coverage Δ
...lrye/reactive/messaging/amqp/AmqpClientHelper.java 70.65% <33.33%> (-1.26%) ⬇️
.../reactive/messaging/mqtt/internal/MqttHelpers.java 51.03% <33.33%> (-0.38%) ⬇️
...ctive/messaging/rabbitmq/RabbitMQClientHelper.java 57.33% <59.37%> (-0.42%) ⬇️
...ka/commit/KafkaThrottledLatestProcessedCommit.java 88.15% <0.00%> (-3.51%) ⬇️
...llrye/reactive/messaging/kafka/impl/KafkaSink.java 92.71% <0.00%> (-1.33%) ⬇️
...reactive/messaging/gcp/pubsub/PubSubConnector.java 46.75% <0.00%> (-1.30%) ⬇️
...rye/reactive/messaging/kafka/impl/KafkaSource.java 84.30% <0.00%> (-0.90%) ⬇️
...ssaging/mqtt/session/MqttClientSessionOptions.java 36.41% <0.00%> (+1.23%) ⬆️
...e/reactive/messaging/amqp/OutgoingAmqpMessage.java 82.60% <0.00%> (+4.34%) ⬆️
...active/messaging/kafka/impl/KafkaRecordStream.java 93.33% <0.00%> (+6.66%) ⬆️
... and 1 more

@ozangunalp
Copy link
Collaborator Author

@cescoffier I've been struggling to test Vert.x net client metrics using micrometer. Am I not supposed to find connection count etc. in the global registry?

@cescoffier
Copy link
Contributor

Not sure about connection count (it's a metric per time window).

Do you have any metrics with the expected prefix?

@ozangunalp
Copy link
Collaborator Author

Ok so it turns out I wasn't configuring Vert.x correctly to enable metrics. With this:

Vertx.vertx(new VertxOptions()
                .setMetricsOptions(new MicrometerMetricsOptions()
                        .setEnabled(true)))

I have meters such as vertx.net.client.active.connections. But I don't see metrics prefixed with the metrics name I set on client creation.

@cescoffier
Copy link
Contributor

You cannot do that - you need to be in Quarkus.

The vert.x micrometer metrics are not reporting the same metrics as (new) quarkus-micrometer. I aligned the reported metrics with the other quarkus-micrometer metrics.

The metrics name using | are read and interpreted by quarkus-micrometer only.

@ozangunalp ozangunalp marked this pull request as ready for review January 9, 2023 11:17
@ozangunalp
Copy link
Collaborator Author

Yes, I later looked the micrometer extension. LGTM with a ad-hoc test.

@ozangunalp ozangunalp added this to the 3.23.0 milestone Jan 9, 2023
@ozangunalp ozangunalp merged commit 53f7527 into smallrye:main Jan 9, 2023
@ozangunalp ozangunalp deleted the vertx_clients_metrics_name branch January 9, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants