Class DatastoreOpenTelemetryOptions.Builder (2.26.4)

publicstaticclass DatastoreOpenTelemetryOptions.Builder

Inheritance

java.lang.Object > DatastoreOpenTelemetryOptions.Builder

Methods

build()

publicDatastoreOpenTelemetryOptionsbuild()
Returns
Type Description
DatastoreOpenTelemetryOptions

setOpenTelemetry(OpenTelemetry openTelemetry)

publicDatastoreOpenTelemetryOptions.BuildersetOpenTelemetry(OpenTelemetryopenTelemetry)

Sets the OpenTelemetry to use with this Datastore instance. If telemetry collection is enabled, but an OpenTelemetry is not provided, the Datastore SDK will attempt to use the GlobalOpenTelemetry.

Parameter
Name Description
openTelemetry io.opentelemetry.api.OpenTelemetry

The OpenTelemetry that should be used by this Datastore instance.

Returns
Type Description
DatastoreOpenTelemetryOptions.Builder

setTracingEnabled(boolean enabled)

publicDatastoreOpenTelemetryOptions.BuildersetTracingEnabled(booleanenabled)

Sets whether tracing should be enabled.

Parameter
Name Description
enabled boolean

Whether tracing should be enabled.

Returns
Type Description
DatastoreOpenTelemetryOptions.Builder

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 2025年11月19日 UTC.