Class HttpClientRequestResendCount
java.lang.Object
io.opentelemetry.instrumentation.api.semconv.http.HttpClientRequestResendCount
A helper that keeps track of the count of the HTTP request resend attempts.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic intget(io.opentelemetry.context.Context context) Returns the count of the already made attempts to send an HTTP request; 0 if this is the first send attempt.static io.opentelemetry.context.Contextinitialize(io.opentelemetry.context.Context context) Initializes the HTTP request resend counter.
-
Method Details
-
initialize
public static io.opentelemetry.context.Context initialize(io.opentelemetry.context.Context context) Initializes the HTTP request resend counter.Note that this must be called on a
contextthat is the parent of all the outgoing HTTP request send attempts; this class is meant to be used before theInstrumenteris used, so that the resend counter is shared across all the resends. -
get
public static int get(io.opentelemetry.context.Context context) Returns the count of the already made attempts to send an HTTP request; 0 if this is the first send attempt.
-