Class HttpTracingRequestInitializer (2.62.0)
2.62.0 (latest)
2.61.0
2.60.0
2.59.0
2.58.0
2.57.2
2.56.0
2.55.3
2.54.2
2.53.0
2.52.0
2.51.0
2.50.1
2.49.0
2.48.1
2.47.0
2.46.0
2.45.0
2.44.0
2.43.3
2.42.3
2.41.0
2.40.3
2.39.1
2.38.2
2.37.2
2.36.0
2.35.0
2.34.2
2.33.2
Beta
This library is covered by the Pre-GA Offerings Terms
of the Terms of Service. Pre-GA libraries might have limited support,
and changes to pre-GA libraries might not be compatible with other pre-GA versions.
For more information, see the
launch stage descriptions .
public class HttpTracingRequestInitializer implements HttpRequestInitializer
HttpRequestInitializer that wraps a delegate initializer, intercepts all HTTP requests, adds
OpenTelemetry tracing and then invokes delegate interceptor.
Implements
com.google.api.client.http.HttpRequestInitializer
Static Fields
HTTP_REQUEST_BODY_SIZE
public static final AttributeKey<Long> HTTP_REQUEST_BODY_SIZE
Field Value
Type
Description
io.opentelemetry.api.common.AttributeKey <Long >
HTTP_REQUEST_METHOD
public static final AttributeKey<String> HTTP_REQUEST_METHOD
Field Value
Type
Description
io.opentelemetry.api.common.AttributeKey <String >
HTTP_REQUEST_RESEND_COUNT
public static final AttributeKey<Long> HTTP_REQUEST_RESEND_COUNT
Field Value
Type
Description
io.opentelemetry.api.common.AttributeKey <Long >
HTTP_RESPONSE_BODY_SIZE
public static final AttributeKey<Long> HTTP_RESPONSE_BODY_SIZE
Field Value
Type
Description
io.opentelemetry.api.common.AttributeKey <Long >
HTTP_RESPONSE_STATUS_CODE
public static final AttributeKey<Long> HTTP_RESPONSE_STATUS_CODE
Field Value
Type
Description
io.opentelemetry.api.common.AttributeKey <Long >
URL_DOMAIN
public static final AttributeKey<String> URL_DOMAIN
Field Value
Type
Description
io.opentelemetry.api.common.AttributeKey <String >
URL_FULL
public static final AttributeKey<String> URL_FULL
Field Value
Type
Description
io.opentelemetry.api.common.AttributeKey <String >
URL_TEMPLATE
public static final AttributeKey<String> URL_TEMPLATE
Field Value
Type
Description
io.opentelemetry.api.common.AttributeKey <String >
Constructors
HttpTracingRequestInitializer(HttpRequestInitializer delegate, Tracer tracer)
public HttpTracingRequestInitializer ( HttpRequestInitializer delegate , Tracer tracer )
Parameters
Name
Description
delegate
com.google.api.client.http.HttpRequestInitializer
tracer
io.opentelemetry.api.trace.Tracer
Methods
initialize(HttpRequest request)
public void initialize ( HttpRequest request )
Parameter
Name
Description
request
com.google.api.client.http.HttpRequest
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-03-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-03-29 UTC."],[],[]]