opentelemetry-propagator-gcp
Google Cloud propagator for OpenTelemetry
What it is and what it does
This package provides OpenTelemetry propagators that handle Google Cloud's X-Cloud-Trace-Context trace header format. It acts as a bridge between OpenTelemetry's standard tracing infrastructure and Google Cloud's native trace propagation, allowing trace context to flow correctly across service boundaries in Google Cloud deployments.
The package offers two propagators: CloudTraceOneWayPropagator (reads only, intended for use with CompositePropagator) and CloudTraceFormatPropagator (reads and writes X-Cloud-Trace-Context headers). It depends only on opentelemetry-api and supports Python 3.9 through 3.13, making it a lightweight addition to existing OpenTelemetry instrumentation.
Use it for:
- Instrument Python services on Google Cloud to propagate trace context in the native X-Cloud-Trace-Context format
- Integrate OpenTelemetry tracing with Google Cloud Trace for centralized observability
- Combine multiple propagators using CompositePropagator to support both standard and Google Cloud trace formats
- Enable distributed tracing across microservices deployed on Google Cloud Platform
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Propagates trace context in Google Cloud's X-Cloud-Trace-Context format for OpenTelemetry, enabling distributed tracing integration with Google Cloud services.
Yes, if you are instrumenting Python services on Google Cloud Platform with OpenTelemetry. The package is actively maintained, has no known vulnerabilities, carries a permissive license, and adds minimal install friction. It is essential for correct trace propagation in Google Cloud environments.
Install
opentelemetry-propagator-gcp on PyPI
pip
pip install opentelemetry-propagator-gcpuv
uv add opentelemetry-propagator-gcppoetry
poetry add opentelemetry-propagator-gcpInstalling opentelemetry-propagator-gcp
Before you install
Low friction install with a single runtime dependency (opentelemetry-api). Actively maintained with recent commits.
License in practice
Apache-2.0 permissive license allows use in most commercial and open-source projects without significant restrictions.
Quickstart
pip install opentelemetry-propagator-gcp
from opentelemetry.propagate import set_global_textmap
from opentelemetry.propagators.cloud_trace_propagator import CloudTraceFormatPropagator
set_global_textmap(CloudTraceFormatPropagator())
Verify before relying
- Whether CloudTraceOneWayPropagator vs CloudTraceFormatPropagator choice affects performance or sampling behavior in production
- Compatibility with non-Google Cloud environments or hybrid deployments
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — opentelemetry-api |
| Maintenance | actively maintained — 11 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,648,128/month — #3,687 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_propagator_gcp-1.14.0-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
opentelemetry-exporter-gcp-traceExports OpenTelemetry traces to Google Cloud…
permissive · top 5,000 on PyPI
opentelemetry-propagator-aws-xrayInjects and extracts AWS X-Ray tracing context…
permissive · top 5,000 on PyPI
opentelemetry-propagator-jaegerProvides trace context propagation for the…
permissive · top 5,000 on PyPI
opentelemetry-propagator-ot-traceProvides OpenTelemetry trace context…
permissive · top 5,000 on PyPI
opentelemetry-propagator-b3Implements the B3 trace context propagation…
permissive · top 5,000 on PyPI
opentelemetry-exporter-gcp-loggingExports OpenTelemetry logs to Google Cloud…
permissive · top 5,000 on PyPI
opentelemetry-exporter-gcp-monitoringExports OpenTelemetry metrics to Google Cloud…
permissive · top 5,000 on PyPI
opentelemetry-resourcedetector-gcpAutomatically detects and reports GCP resource…
permissive · top 5,000 on PyPI
aiobotocore-otelAdds distributed tracing to aiobotocore AWS API…
permissive · top 15,000 on PyPI
nucliadb-telemetryAdds distributed tracing to FastAPI, gRPC, and…
permissive · top 15,000 on PyPI