The project is no longer supported, please consider using Vert.x Micrometer Metrics instead.
Prometheus implementation of the Vert.x Metrics SPI.
You can find latest release on Maven Central.
- Maven:
<dependency>
<groupId>su.nlq</groupId>
<artifactId>vertx-prometheus-metrics</artifactId>
<version>3.6.2</version>
</dependency>
- Gradle:
compile group: 'su.nlq', name: 'vertx-prometheus-metrics', version: '3.6.2'
Now you can set and enable Vert.x metrics:
final Vertx vertx = Vertx.vertx(new VertxOptions().setMetricsOptions(
new VertxPrometheusOptions().setEnabled(true)
));
Metrics | Vert.x | Prometheus |
---|---|---|
0.13.x | 3.4.1 | 0.0.23 |
0.14.x | 3.4.2 | 0.0.26 |
0.15.x | 3.5.0 | 0.1.0 |
Version adjust | ||
3.5.0 | 3.5.0 | 0.1.0 |
3.5.1 | 3.5.1 | 0.2.0 |
3.5.2 | 3.5.2 | 0.4.0 |
3.5.4 | 3.5.4 | 0.5.0 |
3.6.0 | 3.6.0 | 0.5.0 |
3.6.2 | 3.6.2 | 0.6.0 |
There are some special options you can use:
- Enable or disable embedded server to expose metrics for Prometheus consumption via HTTP or check its state (disabled by default)
- Specify host and port of the embedded server (
localhost:9090
by default) - Enable or disable specific
MetricsType
or check their state (all metrics are enabled by default) - Specify which Prometheus
CollectorRegistry
should be used (unless otherwise specified, the default one is used) - Specify the Prometheus
exposition format
(the default isText format
)
The following metrics are provided.
vertx_timers_number
- gauge of the number of timers by statevertx_verticle_number
- gauge of the currently deployed verticles number by class
vertx_eventbus_handlers
- gauge of the registered message handlers numbervertx_eventbus_respondents
- gauge of the registered message reply-handlers numbervertx_eventbus_messages
- gauge of the number of messages by range (local or remote), state and addressvertx_eventbus_failures
- counter of the number of messages handling failures by address, message type and reasonvertx_eventbus_messages_time_seconds
- histogram representing the total processing time (in seconds) of the messages by address and typevertx_eventbus_bytes
- counter of the read\written bytes number by address
vertx_httpserver_requests
- gauge of the number of processing requests by address, HTTP method, path and statevertx_httpserver_responses
- counter of the responses number by address and status codevertx_httpserver_requests_time_seconds
- histogram of the total processing time (in seconds) of the requests by addressvertx_httpserver_websockets
- gauge of the number of the connected websocketsvertx_httpserver_connections
- gauge of the active connections numbervertx_httpserver_bytes
- counter of the read\written bytes number by addressvertx_httpserver_errors
- counter of the number of errors occurred by address
vertx_httpclient_endpoints
- gauge of endpoints number by address and statevertx_httpclient_endpoints_queue_time_seconds
- histogram of the total queue time (in seconds) of pending endpointsvertx_httpclient_requests
- gauge of the number of processing requests by address, HTTP method, path and statevertx_httpclient_requests_time_seconds
- histogram of the total processing time (in seconds) of the requests by addressvertx_httpclient_responses
- counter of the responses number by address and status codevertx_httpclient_websockets
- gauge of the number of the connected websocketsvertx_httpclient_connections
- gauge of the active connections numbervertx_httpclient_bytes
- counter of the read\written bytes number by addressvertx_httpclient_errors
- counter of the number of errors occurred by address
vertx_netserver_connections
- gauge of the active connections numbervertx_netserver_bytes
- counter of the read\written bytes number by addressvertx_netserver_errors
- counter of the number of errors occurred by address
vertx_netclient_connections
- gauge of the active connections numbervertx_netclient_bytes
- counter of the read\written bytes number by addressvertx_netclient_errors
- counter of the number of errors occurred by address