Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Choosing an exporter

Two exporters send spans to Google Cloud Trace. Neither is enabled by default.

ExporterFeatureSends to
OTLP exporterotlpthe Telemetry API, telemetry.googleapis.com, over OTLP
Cloud Trace API exportertrace-apithe Cloud Trace API v2, cloudtrace.googleapis.com

The Telemetry API takes traces, metrics and logs over OTLP. Choose otlp unless the case below applies. It shares credentials and an endpoint with the OTLP log sink and with metrics, and supports regional endpoints.

Choose trace-api when the project is in an Assured Workloads environment with data residency or Impact Level 4 (IL4, a US Department of Defense cloud security level) requirements: do not send spans to the Telemetry API there. See the section “Cloud Trace and data residency” of the Telemetry API traces reference.

Things to know before moving to OTLP

  • Keep the Cloud Trace API enabled on the project, beside the Telemetry API: with it disabled, Google Cloud Observability discards the trace data sent to the Telemetry API. See the Telemetry API traces reference and the Cloud Trace release notes.
  • The role to grant is roles/telemetry.writer, see Authentication.
  • A VPC Service Controls restriction on the Telemetry API applies only to that service. The Cloud Trace API is not covered by it, so check the perimeter for the API the exporter sends to.
  • Google notes that the Cloud Trace format can have lower limits for certain fields than OTLP, so some OTLP data may be lost or not map to Cloud Trace fields. See Migrate from the Cloud Trace API to OTLP endpoints.
  • A regional endpoint, telemetry.REGION.rep.googleapis.com, is chosen with the exporter’s endpoint, see OTLP exporter.

Logging does not depend on the choice: the logging layer reads the span context from the tracing-opentelemetry layer, whichever exporter sits behind it.