Package com.shri.restinpeace.interceptor
Interface MetricsSink
public interface MetricsSink
Receives one completed call's metrics from
MetricsInterceptor -
implement this to route them into Micrometer, a homegrown registry, or
anything else, without RIP itself depending on a metrics library.-
Method Summary
Modifier and TypeMethodDescriptionvoidrecordCall(String httpMethod, String url, int status, long durationMillis) Called once per completed call, right after its response comes back.
-
Method Details
-
recordCall
Called once per completed call, right after its response comes back. Never called for a call that fails at the transport level (a connection refused, a timeout with no response at all) - only a call that actually received a response, successful or not, produces a sample. A retried@Retrycall reports one sample per attempt, not just the final one.- Parameters:
httpMethod- the HTTP method, e.g."GET"url- the fully resolved URL that was calledstatus- the HTTP response status codedurationMillis- how long the call took, from just before it was sent to just after its response came back
-