Class NettyStatusProvider
- All Implemented Interfaces:
StatusProvider,Function<reactor.netty.http.server.HttpServer,,reactor.netty.http.server.HttpServer> NettyServerCustomizer
StatusProvider that provides information regarding the embedded Reactor Netty servers of the application.
For each server, named after the port it listens on, it reports the open connections and the requests being handled, such as
netty-8080: 12 connections, 3 requests. Reactor Netty handles requests on a few event loop threads, which never block, so there is no thread
pool to report on. A server that is not listening is left out.
Reactor Netty does not count its connections and requests unless it records metrics with Micrometer, so this provider counts them itself: it is a
NettyServerCustomizer, which Spring Boot applies to the servers it creates, the server of the application as well as the server of the
management endpoints when they use a port of their own. Only the connections and requests of the servers created after it are counted.
- Author:
- Joao Silva
-
Constructor Details
-
NettyStatusProvider
public NettyStatusProvider()Create a new NettyStatusProvider.
-
-
Method Details
-
apply
public reactor.netty.http.server.HttpServer apply(reactor.netty.http.server.HttpServer server) Makes the server count its connections and requests, and report them once it listens. -
status
Description copied from interface:StatusProviderExposes status information to send to systemd.- Specified by:
statusin interfaceStatusProvider- Returns:
- the string message to add to the service status
-