skillfed

opentelemetry-propagator-gcp

Google Cloud propagator for OpenTelemetry

opentelemetry-propagator-gcp v1.14.0 1.6M downloads/30d#3,687 on PyPI83
Permissive license Apache-2.0 Active released

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-gcp

uv

uv add opentelemetry-propagator-gcp

poetry

poetry add opentelemetry-propagator-gcp

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

google cloud trace context propagationopentelemetry gcp integrationx-cloud-trace-context headerdistributed tracing google cloudopentelemetry propagatorcloud trace instrumentationgcp observability
observabilitydistributed-tracinggcp

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

opentelemetry-exporter-gcp-trace

Exports OpenTelemetry traces to Google Cloud…

permissive · top 5,000 on PyPI

opentelemetry-propagator-aws-xray

Injects and extracts AWS X-Ray tracing context…

permissive · top 5,000 on PyPI

opentelemetry-propagator-jaeger

Provides trace context propagation for the…

permissive · top 5,000 on PyPI

opentelemetry-propagator-ot-trace

Provides OpenTelemetry trace context…

permissive · top 5,000 on PyPI

opentelemetry-propagator-b3

Implements the B3 trace context propagation…

permissive · top 5,000 on PyPI

opentelemetry-exporter-gcp-logging

Exports OpenTelemetry logs to Google Cloud…

permissive · top 5,000 on PyPI

opentelemetry-exporter-gcp-monitoring

Exports OpenTelemetry metrics to Google Cloud…

permissive · top 5,000 on PyPI

opentelemetry-resourcedetector-gcp

Automatically detects and reports GCP resource…

permissive · top 5,000 on PyPI

aiobotocore-otel

Adds distributed tracing to aiobotocore AWS API…

permissive · top 15,000 on PyPI

nucliadb-telemetry

Adds distributed tracing to FastAPI, gRPC, and…

permissive · top 15,000 on PyPI