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 String
The number of the connections that have been successfully acquired and are in active use.static final String
The actual bytes consumed by in-use buffers allocated from direct buffer pools.static final String
The actual bytes consumed by in-use buffers allocated from heap buffer pools.static final String
The number of the active HTTP/2 streams.static final String
Time spent for resolving the address.static final String
Name prefix that will be used for the ByteBufAllocator's metrics registered in Micrometer's global registry.static final String
The chunk size for an arena.static final String
Time spent for connecting to the remote address.static final String
Name prefix that will be used for the PooledConnectionProvider's metrics registered in Micrometer's global registry.static final String
The number of connections that are currently in use.static final String
The number of all connections, whether they are active or idle.static final String
Amount of the data received, in bytes.static final String
Time spent in consuming incoming data.static final String
Amount of the data sent, in bytes.static final String
Time spent in sending outgoing data.static final String
The number of direct arenas.static final String
static final String
Number of errors that occurred.static final String
Name prefix that will be used for Event Loop Group metrics registered in Micrometer's global registry.static final String
The number of heap arenas.static final String
Name prefix that will be used for the HTTP client's metrics registered in Micrometer's global registry.static final String
Name prefix that will be used for the HTTP server's metrics registered in Micrometer's global registry.static final String
static final String
The number of the idle connections.static final String
static final String
The maximum number of active connections that are allowed.static final String
The maximum number of requests that will be queued while waiting for a ready connection.static final String
static final String
static final String
static final String
The size of the normal cache.static final String
static io.micrometer.observation.ObservationRegistry
static final String
The number of requests that are waiting for a connection.static final String
The number of requests that are waiting for opening HTTP/2 stream.static final String
The number of tasks that are pending for processing on an event loop.static final String
static final io.micrometer.core.instrument.MeterRegistry
static final String
static final String
Total time for the request/response.static final String
The size of the small cache.static final String
static final String
The number of active HTTP/2 streams.static final String
static final String
Name prefix that will be used for the TCP client's metrics registered in Micrometer's global registry.static final String
Name prefix that will be used for the TCP server's metrics registered in Micrometer's global registry.static final String
The number of thread local caches.static final String
Time spent for TLS handshake.static final String
The number of all connections, active or idle.static final String
static final String
Name prefix that will be used for the UDP client's metrics registered in Micrometer's global registry.static final String
Name prefix that will be used for the UDP server's metrics registered in Micrometer's global registry.static final String
static final String
static final String
The number of bytes reserved by direct buffer allocator.static final String
The number of bytes reserved by heap buffer allocator. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable io.micrometer.observation.Observation
currentObservation
(ContextView contextView) static @Nullable String
formatSocketAddress
(@Nullable SocketAddress socketAddress) static io.micrometer.observation.ObservationRegistry
observationRegistry
(io.micrometer.observation.ObservationRegistry observationRegistry) Set theObservationRegistry
to use in Reactor Netty for tracing related purposes.static @Nullable ContextView
updateChannelContext
(Channel channel, io.micrometer.observation.Observation observation) Updates theContextView
in the channel attributes with thisObservation
.static Context
updateContext
(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 theObservationRegistry
to 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 theContextView
in the channel attributes with thisObservation
. When there is alreadyObservation
in theContextView
, then is will be set as a parent to thisObservation
.- Parameters:
channel
- the channelobservation
- theObservation
- Returns:
- the previous
Observation
when exists otherwisenull
- Since:
- 1.1.1
-