skillfed

google-cloud-trace

Google Cloud Trace API client library

google-cloud-trace v1.20.0 12.3M downloads/30d#1,328 on PyPI5,373
Permissive license Apache-2.0 Active released

What it is and what it does

google-cloud-trace is the official Python client library for Google Cloud Trace, a distributed tracing service that collects and visualizes latency data across your application. It lets you send trace spans directly to Cloud Trace for applications running outside App Engine, complementing the automatic tracing available for App Engine deployments. The library wraps the Trace API and handles authentication, serialization, and transport via gRPC.

The package is built on standard Google Cloud client infrastructure (google-api-core, google-auth, grpcio, proto-plus, protobuf) and supports Python 3.10 and later. It is actively maintained and widely used (top 5000 on PyPI). The documentation recommends OpenTelemetry for application instrumentation rather than direct API calls, so this library is typically used either for custom tracing workflows or as a backend for OpenTelemetry exporters.

Use it for:

  • Send custom trace spans from microservices running on Compute Engine or GKE to visualize request flow and latency.
  • Instrument batch jobs or background workers to track execution time and dependencies across distributed tasks.
  • Export traces from on-premises or multi-cloud applications to a centralized Google Cloud Trace dashboard.
  • Integrate with OpenTelemetry collectors to export trace data to Cloud Trace from any instrumented application.
  • Debug performance bottlenecks by correlating trace spans with Cloud Logging and Cloud Monitoring data.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Sends application trace data to Google Cloud Trace for distributed tracing and performance monitoring. Provides direct API access to the Trace service for applications outside App Engine.

Yes, if you are running applications on Google Cloud and need direct access to the Trace API or are building custom tracing workflows. The library is production-stable, actively maintained, and has no known vulnerabilities. Install friction is low. If your primary goal is application instrumentation, the documentation recommends OpenTelemetry instead. Permissive Apache-2.0 license poses no restrictions for most use cases.

Install

google-cloud-trace on PyPI

pip

pip install google-cloud-trace

uv

uv add google-cloud-trace

poetry

poetry add google-cloud-trace

Installing google-cloud-trace

Before you install

Low friction install with a pure-Python wheel. Actively maintained as of 2026-08-14 with recent releases. Depends on standard Google Cloud libraries (google-api-core, google-auth, grpcio, proto-plus, protobuf), all widely used and stable.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.

Quickstart

pip install google-cloud-trace

from google.cloud import trace_v2

client = trace_v2.TraceServiceClient()
# Use client to send spans to Cloud Trace

Requires Python >= 3.10. Requires Google Cloud authentication (service account key or Application Default Credentials) and an active Google Cloud project with Cloud Trace enabled.

Verify before relying

  • Whether OpenTelemetry integration is recommended over direct API use for most applications.
  • Performance overhead of trace collection and transmission in high-throughput scenarios.
  • Compatibility with non-Google Cloud observability backends or hybrid tracing setups.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — google-api-core, google-auth, grpcio, proto-plus, protobuf
Maintenance actively maintained — 53 days since the last release
Last repo commit
First released
Downloads 12,269,201/month — #1,328 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: google_cloud_trace-1.20.0-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet

Tags

cloud trace client librarydistributed tracing google cloudapplication performance monitoringsend trace data to stackdrivergoogle cloud trace apirequest tracing and latency analysiscloud observability tracing
google-clouddistributed-tracingobservability

More Internet packages

botocore

Botocore provides low-level, data-driven access…

permissive · top 100 on PyPI

aiobotocore

Provides an async client for AWS services using…

permissive · top 100 on PyPI

pydantic

Pydantic validates Python data structures…

permissive · top 100 on PyPI

filelock

Provides a platform-independent file locking…

permissive · top 100 on PyPI

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

googleapis-common-protos

Provides common Protocol Buffer message…

permissive · top 100 on PyPI

google-cloud-monitoring

Python client library for Google Cloud…

permissive · top 1,000 on PyPI

google-cloud-appengine-logging

Client library for Google Cloud AppEngine…

permissive · top 1,000 on PyPI

google-cloud-monitoring-dashboards

Python client library for Google Cloud…

permissive · top 15,000 on PyPI

google-cloud-logging

Writes log entries to Google Cloud Logging and…

permissive · top 1,000 on PyPI

google-cloud-tasks

Python client library for Google Cloud Tasks,…

permissive · top 1,000 on PyPI

google-cloud-bigquery-logging

Python client library for Google Cloud BigQuery…

permissive · top 15,000 on PyPI

google-cloud-billing

Programmatic access to Google Cloud Platform…

permissive · top 15,000 on PyPI

google-cloud-error-reporting

Client library for Google Cloud Error Reporting…

permissive · top 5,000 on PyPI

google-cloud-service-usage

Provides a Python client for Google Cloud…

permissive · top 15,000 on PyPI

google-cloud-service-control

Python client library for Google Cloud Service…

permissive · top 15,000 on PyPI