use of com.couchbase.client.core.cnc.metrics.NoopMeter in project couchbase-jvm-clients by couchbase.
the class RequestContext method logicallyComplete.
/**
* Signals that this request is completed fully, including streaming sections or logical sub-requests also being
* completed (i.e. observe polling).
*/
@Stability.Internal
public RequestContext logicallyComplete() {
this.logicallyCompletedAt = System.nanoTime();
RequestSpan span = request.requestSpan();
if (span != null) {
span.attribute(TracingIdentifiers.ATTR_RETRIES, retryAttempts());
span.end();
}
if (!(environment().meter() instanceof NoopMeter)) {
long latency = logicalRequestLatency();
if (latency > 0) {
core().responseMetric(request).recordValue(latency);
}
}
return this;
}
Aggregations