--- id: google-cloud-trace version: "1.20.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # google-cloud-trace — Google Cloud Trace API client library License: permissive · Maintenance: active · Downloads: 12.3M/mo ## 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 above — 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 pip install google-cloud-trace uv add google-cloud-trace 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_current - Install friction: low - Maintenance: active - Downloads: 12.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags cloud trace client library, distributed tracing google cloud, application performance monitoring, send trace data to stackdriver, google cloud trace api, request tracing and latency analysis, cloud observability tracing, google-cloud, distributed-tracing, observability [View on SkillFed](https://skillfed.io/packages/google-cloud-trace) · [View on PyPI](https://pypi.org/project/google-cloud-trace/)