Telemetry (OTLP) API overview

This document describes the Telemetry (OTLP) API, which implements the OpenTelemetry OTLP Protocol. This API is designed for use with applications that are instrumented by using one of the OpenTelemetry SDKs.

Why you should use the Telemetry API

OpenTelemetry is a Google Cloud-supported open source project with Google Cloud engineers staffed to ensure support for ingesting and visualizing your trace data.

When you use the Telemetry API, your data is stored in a format that is generally consistent with the proto files defined by the OpenTelemetry OTLP Protocol. However, fields might be converted from an OpenTelemetry-specific data type to a JSON data type before storage. Further, the limits for the Telemetry API apply. These limits are often more generous than those for the Cloud Trace API. Lastly, your instrumentation doesn't rely on a Google Cloud-specific exporter.

To learn more about the storage format, see Schema for trace data.

When to use the Telemetry API

When instrumenting your applications to send trace data to your Google Cloud project, we recommend that you do one of the following:

  • Use an exporter that writes OTLP to a Collector, which then sends your trace data to the Telemetry API.
  • Use an in-process OTLP exporter supported by an OpenTelemetry library that sends telemetry to the Telemetry API. There is no collector with this configuration.

For information about how to use the Telemetry API, see Migrate from the Cloud Trace exporter to the OTLP endpoint.

Where to view ingested data

Trace data that is ingested through the Telemetry API can be viewed using the Trace Explorer page. For information about how to view your trace data, see Find and explore traces.

Authentication

Exporters must be authorized to send data to your Google Cloud project. For example, you can configure the exporter with your Google Cloud Application Default Credentials (ADC) by adding a language-specific Google Auth Library to your application. For more information and sample code, see Configure authentication.

VPC Service Controls support

The Telemetry API service, whose service name is telemetry.googleapis.com, is a VPC Service Controls-supported service. Any VPC Service Controls restrictions that you create for the Telemetry API service apply only to that service. Those restrictions don't apply to any other services, including those like the cloudtrace.googleapis.com service, which can also ingest trace data.

For more information, see the following: