Struct OpenTelemetryTracingOption (2.15.1)

Enables tracing with OpenTelemetry

Setting this option enables the generation of traces by the client library. The library uses the global tracer provider to generate traces.

Prerequisites

The library must be compiled with OpenTelemetry in order for this option to take effect.

See Also

The OpenTelemetry tracing quickstart for instructions on how to compile google-cloud-cpp with opentelemetry-cpp.

Effect

Setting this option enables the generation of traces by the client library. The library uses the global tracer provider to generate traces.

Exporting traces

Providing this option to a client only enables the generation of traces. It does not enable the export of traces. In order to export the traces, the application must set the global tracer provider. The client library recommends using #google::cloud::otel::ConfigureBasicTracing() to configure the global tracer provider. This will send the traces generated by the client library to Cloud Trace, Google Cloud's visualizer for distributed traces.

See Also

Google Cloud C++ OpenTelemetry reference docs.

Environment variable

This option is controlled by the GOOGLE_CLOUD_CPP_OPENTELEMETRY_TRACING environment variable. If the environment variable is set to a non-empty value, tracing with OpenTelemetry is enabled.

Type Aliases

Type

Alias Of: bool