@FunctionalInterface public interface PServiceCallInstrumentation
| Modifier and Type | Field and Description |
|---|---|
static PServiceCallInstrumentation |
NOOP
A simple NO-OP instrumentation instance.
|
static long |
NS_IN_MILLIS
Handy constant for calculating MS duration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onComplete(double duration,
PServiceCall<?> call,
PServiceCall<?> reply)
After each service call this method is called with the duration, call and
response objects.
|
default void |
onTransportException(Exception e,
double duration,
PServiceCall<?> call,
PServiceCall<?> reply)
Called when the service call failed in the transport layer itself with something
not related to the actual service call.
|
static final PServiceCallInstrumentation NOOP
static final long NS_IN_MILLIS
void onComplete(double duration,
@Nullable
PServiceCall<?> call,
@Nullable
PServiceCall<?> reply)
Note that the timing may not include the whole stack time since receiving
the first packet, that is dependent on the specific implementation and the
limitations there. E.g. it does not include the time receiving the first
HTTP packet with the headers, or waiting for free worker threads when using
ProvidenceServlet.
duration - The duration of handling the service call in milliseconds,
including receiving and sending it.call - The call triggered.reply - The reply returned.default void onTransportException(@Nonnull Exception e, double duration, @Nullable PServiceCall<?> call, @Nullable PServiceCall<?> reply)
e - The exception thrown.duration - The duration of handling the service call in milliseconds,
including receiving and sending it.call - The service call.reply - The service reply.Copyright © 2015–2020 morimekta.net. All rights reserved.