Package reactor.netty
Class Metrics
java.lang.Object
reactor.netty.Metrics
Constants and utilities around metrics.
- Since:
- 0.9
- Author:
- Violeta Georgieva
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe number of the connections that have been successfully acquired and are in active use.static final StringThe actual bytes consumed by in-use buffers allocated from direct buffer pools.static final StringThe actual bytes consumed by in-use buffers allocated from heap buffer pools.static final StringThe number of the active HTTP/2 streams.static final StringTime spent for resolving the address.static final StringName prefix that will be used for the ByteBufAllocator's metrics registered in Micrometer's global registry.static final StringThe chunk size for an arena.static final StringTime spent for connecting to the remote address.static final StringName prefix that will be used for the PooledConnectionProvider's metrics registered in Micrometer's global registry.static final StringThe number of connections that are currently in use.static final StringThe number of all connections, whether they are active or idle.static final StringAmount of the data received, in bytes.static final StringTime spent in consuming incoming data.static final StringAmount of the data sent, in bytes.static final StringTime spent in sending outgoing data.static final StringThe number of direct arenas.static final Stringstatic final StringNumber of errors that occurred.static final StringName prefix that will be used for Event Loop Group metrics registered in Micrometer's global registry.static final StringThe number of heap arenas.static final StringName prefix that will be used for the HTTP client's metrics registered in Micrometer's global registry.static final StringName prefix that will be used for the HTTP server's metrics registered in Micrometer's global registry.static final Stringstatic final StringThe number of the idle connections.static final Stringstatic final StringThe maximum number of active connections that are allowed.static final StringThe maximum number of requests that will be queued while waiting for a ready connection.static final Stringstatic final Stringstatic final Stringstatic final StringThe size of the normal cache.static final Stringstatic io.micrometer.observation.ObservationRegistrystatic final StringThe number of requests that are waiting for a connection.static final StringThe number of requests that are waiting for opening HTTP/2 stream.static final StringThe number of tasks that are pending for processing on an event loop.static final Stringstatic final io.micrometer.core.instrument.MeterRegistrystatic final Stringstatic final StringTotal time for the request/response.static final StringThe size of the small cache.static final Stringstatic final StringThe number of active HTTP/2 streams.static final Stringstatic final StringName prefix that will be used for the TCP client's metrics registered in Micrometer's global registry.static final StringName prefix that will be used for the TCP server's metrics registered in Micrometer's global registry.static final StringThe number of thread local caches.static final StringTime spent for TLS handshake.static final StringThe number of all connections, active or idle.static final Stringstatic final StringName prefix that will be used for the UDP client's metrics registered in Micrometer's global registry.static final StringName prefix that will be used for the UDP server's metrics registered in Micrometer's global registry.static final Stringstatic final Stringstatic final StringThe number of bytes reserved by direct buffer allocator.static final StringThe number of bytes reserved by heap buffer allocator. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable io.micrometer.observation.ObservationcurrentObservation(ContextView contextView) static StringformatSocketAddress(SocketAddress socketAddress) static io.micrometer.observation.ObservationRegistryobservationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry) Set theObservationRegistryto use in Reactor Netty for tracing related purposes.static @Nullable ContextViewupdateChannelContext(Channel channel, io.micrometer.observation.Observation observation) Updates theContextViewin the channel attributes with thisObservation.static ContextupdateContext(Context context, Object observation)
-
Field Details
-
REGISTRY
public static final io.micrometer.core.instrument.MeterRegistry REGISTRY -
OBSERVATION_KEY
- See Also:
-
OBSERVATION_REGISTRY
public static io.micrometer.observation.ObservationRegistry OBSERVATION_REGISTRY -
HTTP_SERVER_PREFIX
Name prefix that will be used for the HTTP server's metrics registered in Micrometer's global registry.- See Also:
-
HTTP_CLIENT_PREFIX
Name prefix that will be used for the HTTP client's metrics registered in Micrometer's global registry.- See Also:
-
TCP_SERVER_PREFIX
Name prefix that will be used for the TCP server's metrics registered in Micrometer's global registry.- See Also:
-
TCP_CLIENT_PREFIX
Name prefix that will be used for the TCP client's metrics registered in Micrometer's global registry.- See Also:
-
UDP_SERVER_PREFIX
Name prefix that will be used for the UDP server's metrics registered in Micrometer's global registry.- See Also:
-
UDP_CLIENT_PREFIX
Name prefix that will be used for the UDP client's metrics registered in Micrometer's global registry.- See Also:
-
EVENT_LOOP_PREFIX
Name prefix that will be used for Event Loop Group metrics registered in Micrometer's global registry.- See Also:
-
CONNECTION_PROVIDER_PREFIX
Name prefix that will be used for the PooledConnectionProvider's metrics registered in Micrometer's global registry.- See Also:
-
BYTE_BUF_ALLOCATOR_PREFIX
Name prefix that will be used for the ByteBufAllocator's metrics registered in Micrometer's global registry.- See Also:
-
DATA_RECEIVED
Amount of the data received, in bytes.- See Also:
-
DATA_SENT
Amount of the data sent, in bytes.- See Also:
-
ERRORS
Number of errors that occurred.- See Also:
-
TLS_HANDSHAKE_TIME
Time spent for TLS handshake.- See Also:
-
CONNECT_TIME
Time spent for connecting to the remote address.- See Also:
-
DATA_RECEIVED_TIME
Time spent in consuming incoming data.- See Also:
-
DATA_SENT_TIME
Time spent in sending outgoing data.- See Also:
-
RESPONSE_TIME
Total time for the request/response.- See Also:
-
CONNECTIONS_TOTAL
The number of all connections, whether they are active or idle.- See Also:
-
CONNECTIONS_ACTIVE
The number of connections that are currently in use.- See Also:
-
ADDRESS_RESOLVER
Time spent for resolving the address.- See Also:
-
TOTAL_CONNECTIONS
The number of all connections, active or idle.- See Also:
-
ACTIVE_CONNECTIONS
The number of the connections that have been successfully acquired and are in active use.- See Also:
-
MAX_CONNECTIONS
The maximum number of active connections that are allowed.- See Also:
-
IDLE_CONNECTIONS
The number of the idle connections.- See Also:
-
PENDING_CONNECTIONS
The number of requests that are waiting for a connection.- See Also:
-
MAX_PENDING_CONNECTIONS
The maximum number of requests that will be queued while waiting for a ready connection.- See Also:
-
ACTIVE_STREAMS
The number of the active HTTP/2 streams.- See Also:
-
PENDING_STREAMS
The number of requests that are waiting for opening HTTP/2 stream.- See Also:
-
USED_HEAP_MEMORY
The number of bytes reserved by heap buffer allocator.- See Also:
-
USED_DIRECT_MEMORY
The number of bytes reserved by direct buffer allocator.- See Also:
-
ACTIVE_HEAP_MEMORY
The actual bytes consumed by in-use buffers allocated from heap buffer pools.- See Also:
-
ACTIVE_DIRECT_MEMORY
The actual bytes consumed by in-use buffers allocated from direct buffer pools.- See Also:
-
HEAP_ARENAS
The number of heap arenas.- See Also:
-
DIRECT_ARENAS
The number of direct arenas.- See Also:
-
THREAD_LOCAL_CACHES
The number of thread local caches.- See Also:
-
SMALL_CACHE_SIZE
The size of the small cache.- See Also:
-
NORMAL_CACHE_SIZE
The size of the normal cache.- See Also:
-
CHUNK_SIZE
The chunk size for an arena.- See Also:
-
PENDING_TASKS
The number of tasks that are pending for processing on an event loop.- See Also:
-
STREAMS_ACTIVE
The number of active HTTP/2 streams.- See Also:
-
LOCAL_ADDRESS
- See Also:
-
PROXY_ADDRESS
- See Also:
-
REMOTE_ADDRESS
- See Also:
-
URI
- See Also:
-
STATUS
- See Also:
-
METHOD
- See Also:
-
ID
- See Also:
-
NAME
- See Also:
-
TYPE
- See Also:
-
SUCCESS
- See Also:
-
ERROR
- See Also:
-
UNKNOWN
- See Also:
-
NA
- See Also:
-
-
Constructor Details
-
Metrics
public Metrics()
-
-
Method Details
-
currentObservation
public static @Nullable io.micrometer.observation.Observation currentObservation(ContextView contextView) -
formatSocketAddress
-
observationRegistry
public static io.micrometer.observation.ObservationRegistry observationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry) Set theObservationRegistryto use in Reactor Netty for tracing related purposes.- Returns:
- the previously configured registry.
- Since:
- 1.1.6
-
updateContext
-
updateChannelContext
public static @Nullable ContextView updateChannelContext(Channel channel, io.micrometer.observation.Observation observation) Updates theContextViewin the channel attributes with thisObservation. When there is alreadyObservationin theContextView, then is will be set as a parent to thisObservation.- Parameters:
channel- the channelobservation- theObservation- Returns:
- the previous
Observationwhen exists otherwisenull - Since:
- 1.1.1
-