Cloud Trace API

Stay organized with collections Save and categorize content based on your preferences.

Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Cloud Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenTelemetry.


The Service name is needed to create RPC client stubs.


GetTrace Gets a single trace by its ID.
ListTraces Returns a list of traces that match the specified filter conditions.
PatchTraces Sends new traces to Cloud Trace or updates existing traces.


BatchWriteSpans Batch writes new spans to new or existing traces.
CreateSpan Creates a new span.


CreateTraceSink Creates a sink that exports trace spans to a destination.
DeleteTraceSink Deletes a sink.
GetTraceSink Get a trace sink by name under the parent resource (GCP project).
ListTraceSinks List all sinks for the parent resource (GCP project).
UpdateTraceSink Updates a sink.