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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["This webpage details the `OpenTelemetryTracingOption` feature for the Google Cloud C++ client library, enabling the generation of traces within the application."],["The latest version available is `2.37.0-rc`, with multiple prior versions listed, ranging down to `2.10.1`."],["To use this feature, the library must be compiled with OpenTelemetry support, and it will use the global tracer provider to generate traces."],["Enabling this option only generates traces; exporting them requires setting up a global tracer provider, such as with `google::cloud::otel::ConfigureBasicTracing()` to use Cloud Trace."],["The `GOOGLE_CLOUD_CPP_OPENTELEMETRY_TRACING` environment variable can also be used to toggle OpenTelemetry tracing on or off, taking a boolean value."]]],[]]