Package io.grpc.opentelemetry
Class OpenTelemetryTracingModule.CallAttemptsTracerFactory
java.lang.Object
io.grpc.ClientStreamTracer.Factory
io.grpc.opentelemetry.OpenTelemetryTracingModule.CallAttemptsTracerFactory
- Enclosing class:
OpenTelemetryTracingModule
final class OpenTelemetryTracingModule.CallAttemptsTracerFactory
extends io.grpc.ClientStreamTracer.Factory
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
private final io.opentelemetry.api.trace.Span
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionCallAttemptsTracerFactory
(io.opentelemetry.api.trace.Span clientSpan, io.grpc.MethodDescriptor<?, ?> method) -
Method Summary
Modifier and TypeMethodDescription(package private) void
callEnded
(io.grpc.Status status) Record a finished call and mark the current time as the end time.io.grpc.ClientStreamTracer
newClientStreamTracer
(io.grpc.ClientStreamTracer.StreamInfo info, io.grpc.Metadata headers)
-
Field Details
-
callEnded
volatile int callEnded -
clientSpan
private final io.opentelemetry.api.trace.Span clientSpan -
fullMethodName
-
-
Constructor Details
-
CallAttemptsTracerFactory
CallAttemptsTracerFactory(io.opentelemetry.api.trace.Span clientSpan, io.grpc.MethodDescriptor<?, ?> method)
-
-
Method Details
-
newClientStreamTracer
public io.grpc.ClientStreamTracer newClientStreamTracer(io.grpc.ClientStreamTracer.StreamInfo info, io.grpc.Metadata headers) - Overrides:
newClientStreamTracer
in classio.grpc.ClientStreamTracer.Factory
-
callEnded
void callEnded(io.grpc.Status status) Record a finished call and mark the current time as the end time.Can be called from any thread without synchronization. Calling it the second time or more is a no-op.
-