Package io.grpc.opentelemetry
Class OpenTelemetryMetricsModule.CallAttemptsTracerFactory
java.lang.Object
io.grpc.ClientStreamTracer.Factory
io.grpc.opentelemetry.OpenTelemetryMetricsModule.CallAttemptsTracerFactory
- Enclosing class:
OpenTelemetryMetricsModule
static final class OpenTelemetryMetricsModule.CallAttemptsTracerFactory
extends io.grpc.ClientStreamTracer.Factory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private final AtomicLong
private final com.google.common.base.Stopwatch
private boolean
private long
private final List
<OpenTelemetryPlugin.ClientCallPlugin> private final com.google.common.base.Stopwatch
private boolean
private final String
private final Object
private final OpenTelemetryMetricsModule
private io.grpc.Status
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionCallAttemptsTracerFactory
(OpenTelemetryMetricsModule module, String target, String fullMethodName, List<OpenTelemetryPlugin.ClientCallPlugin> callPlugins) -
Method Summary
Modifier and TypeMethodDescription(package private) void
(package private) void
callEnded
(io.grpc.Status status) io.grpc.ClientStreamTracer
newClientStreamTracer
(io.grpc.ClientStreamTracer.StreamInfo info, io.grpc.Metadata metadata) newClientTracer
(io.grpc.ClientStreamTracer.StreamInfo info) (package private) void
-
Field Details
-
module
-
target
-
attemptStopwatch
private final com.google.common.base.Stopwatch attemptStopwatch -
callStopWatch
private final com.google.common.base.Stopwatch callStopWatch -
callEnded
private boolean callEnded -
fullMethodName
-
callPlugins
-
status
private io.grpc.Status status -
callLatencyNanos
private long callLatencyNanos -
lock
-
attemptsPerCall
-
activeStreams
private int activeStreams -
finishedCallToBeRecorded
private boolean finishedCallToBeRecorded
-
-
Constructor Details
-
CallAttemptsTracerFactory
CallAttemptsTracerFactory(OpenTelemetryMetricsModule module, String target, String fullMethodName, List<OpenTelemetryPlugin.ClientCallPlugin> callPlugins)
-
-
Method Details
-
newClientStreamTracer
public io.grpc.ClientStreamTracer newClientStreamTracer(io.grpc.ClientStreamTracer.StreamInfo info, io.grpc.Metadata metadata) - Overrides:
newClientStreamTracer
in classio.grpc.ClientStreamTracer.Factory
-
newClientTracer
private OpenTelemetryMetricsModule.ClientTracer newClientTracer(io.grpc.ClientStreamTracer.StreamInfo info) -
attemptEnded
void attemptEnded() -
callEnded
void callEnded(io.grpc.Status status) -
recordFinishedCall
void recordFinishedCall()
-