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
Fields Modifier and Type Field Description private intactiveStreamsprivate java.util.concurrent.atomic.AtomicLongattemptsPerCallprivate com.google.common.base.StopwatchattemptStopwatchprivate booleancallEndedprivate longcallLatencyNanosprivate java.util.List<OpenTelemetryPlugin.ClientCallPlugin>callPluginsprivate com.google.common.base.StopwatchcallStopWatchprivate booleanfinishedCallToBeRecordedprivate java.lang.StringfullMethodNameprivate java.lang.Objectlockprivate OpenTelemetryMetricsModulemoduleprivate io.grpc.Statusstatusprivate java.lang.Stringtarget
-
Constructor Summary
Constructors Constructor Description CallAttemptsTracerFactory(OpenTelemetryMetricsModule module, java.lang.String target, java.lang.String fullMethodName, java.util.List<OpenTelemetryPlugin.ClientCallPlugin> callPlugins)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidattemptEnded()(package private) voidcallEnded(io.grpc.Status status)io.grpc.ClientStreamTracernewClientStreamTracer(io.grpc.ClientStreamTracer.StreamInfo info, io.grpc.Metadata metadata)private OpenTelemetryMetricsModule.ClientTracernewClientTracer(io.grpc.ClientStreamTracer.StreamInfo info)(package private) voidrecordFinishedCall()
-
-
-
Field Detail
-
module
private final OpenTelemetryMetricsModule module
-
target
private final java.lang.String target
-
attemptStopwatch
private final com.google.common.base.Stopwatch attemptStopwatch
-
callStopWatch
private final com.google.common.base.Stopwatch callStopWatch
-
callEnded
private boolean callEnded
-
fullMethodName
private final java.lang.String fullMethodName
-
callPlugins
private final java.util.List<OpenTelemetryPlugin.ClientCallPlugin> callPlugins
-
status
private io.grpc.Status status
-
callLatencyNanos
private long callLatencyNanos
-
lock
private final java.lang.Object lock
-
attemptsPerCall
private final java.util.concurrent.atomic.AtomicLong attemptsPerCall
-
activeStreams
private int activeStreams
-
finishedCallToBeRecorded
private boolean finishedCallToBeRecorded
-
-
Constructor Detail
-
CallAttemptsTracerFactory
CallAttemptsTracerFactory(OpenTelemetryMetricsModule module, java.lang.String target, java.lang.String fullMethodName, java.util.List<OpenTelemetryPlugin.ClientCallPlugin> callPlugins)
-
-
Method Detail
-
newClientStreamTracer
public io.grpc.ClientStreamTracer newClientStreamTracer(io.grpc.ClientStreamTracer.StreamInfo info, io.grpc.Metadata metadata)- Overrides:
newClientStreamTracerin 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()
-
-