reactive HTTP requests
observations.
This context also extends RequestReplyReceiverContext for propagating
tracing information during HTTP request processing.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private boolean | |
| public static final String | CURRENT_OBSERVATION_CONTEXT_ATTRIBUTE
Name of the request attribute holding the |
| private String |
| Access | Constructor and Description |
|---|---|
| public | ServerRequestObservationContext(ServerHttpRequest
the current request request, ServerHttpResponse the current response response, Map<String, Object> the current attributes attributes)Create a new |
| Modifier and Type | Method and Description |
|---|---|
| public static Optional | Returns: the current observation contextthe current exchange attributes attributes)Get the current |
| public Map | |
| public String | Returns: the path pattern, ornull if none foundReturn the path pattern for the handler that matches the current request. |
| public boolean | Returns: if the connection has been abortedWhether the current connection was aborted by the client, resulting in a
|
| public void | setConnectionAborted(boolean
if the connection has been aborted connectionAborted)Set whether the current connection was aborted by the client, resulting in a
|
| public void | setPathPattern(String
the path pattern, for example pathPattern)"/projects/{name}".Set the path pattern for the handler that matches the current request. |
| attributes | back to summary |
|---|---|
| private final Map<String, Object> attributes | |
| connectionAborted | back to summary |
|---|---|
| private boolean connectionAborted | |
| CURRENT_OBSERVATION_CONTEXT_ATTRIBUTE | back to summary |
|---|---|
| public static final String CURRENT_OBSERVATION_CONTEXT_ATTRIBUTE Name of the request attribute holding the
| |
| pathPattern | back to summary |
|---|---|
| private String pathPattern
| |
| ServerRequestObservationContext | back to summary |
|---|---|
| public ServerRequestObservationContext(ServerHttpRequest request, ServerHttpResponse response, Map<String, Object> attributes) Create a new
| |
| findCurrent | back to summary |
|---|---|
| public static Optional Get the current
| |
| getAttributes | back to summary |
|---|---|
| public Map Return an immutable map of the current request attributes. | |
| getPathPattern | back to summary |
|---|---|
| public String getPathPattern() Return the path pattern for the handler that matches the current request.
For example, Path patterns must have a low cardinality for the entire application. | |
| isConnectionAborted | back to summary |
|---|---|
| public boolean isConnectionAborted() Whether the current connection was aborted by the client, resulting in a
| |
| setConnectionAborted | back to summary |
|---|---|
| public void setConnectionAborted(boolean connectionAborted) Set whether the current connection was aborted by the client, resulting in a
| |
| setPathPattern | back to summary |
|---|---|
| public void setPathPattern(String pathPattern) Set the path pattern for the handler that matches the current request. Path patterns must have a low cardinality for the entire application.
| |