Skip to main content
https://badge.fury.io/py/opentelemetry-exporter-gcp-trace.svg Documentation Status

This library provides support for exporting traces to Google Cloud Trace.

To get started with instrumentation in Google Cloud, see Generate traces and metrics with Python.

To learn more about instrumentation and observability, including opinionated recommendations for Google Cloud Observability, visit Instrumentation and observability.

For resource detection and GCP trace context propagation, see opentelemetry-tools-google-cloud. For the Google Cloud Monitoring exporter, see opentelemetry-exporter-gcp-monitoring.

Installation

pip install opentelemetry-exporter-gcp-trace

Usage

from opentelemetry import trace
from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
    SimpleSpanProcessor,
)

trace.set_tracer_provider(TracerProvider())

cloud_trace_exporter = CloudTraceSpanExporter(
    project_id='my-gcloud-project',
)
trace.get_tracer_provider().add_span_processor(
    SimpleSpanProcessor(cloud_trace_exporter)
)
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span('foo'):
    print('Hello world!')

References

Metadata

Release files for opentelemetry-exporter-gcp-trace 1.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opentelemetry-exporter-gcp-trace 1.15.0
File Size Uploaded Provenance Actions
opentelemetry_exporter_gcp_trace-1.15.0.tar.gz 19.6 kB Without provenance Details for opentelemetry_exporter_gcp_trace-1.15.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opentelemetry-exporter-gcp-trace 1.15.0
File Interpreter ABI Platform Actions
opentelemetry_exporter_gcp_trace-1.15.0-py3-none-any.whl Python 3 none any Details for opentelemetry_exporter_gcp_trace-1.15.0-py3-none-any.whl

Total release size: 34.0 kB

Release files / opentelemetry_exporter_gcp_trace-1.15.0.tar.gz

Download URL opentelemetry_exporter_gcp_trace-1.15.0.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
70db6b807756c0815dce6af2f230663a07983f73bde0b7302e21f3a241b512cd
BLAKE2b-256 checksum
How to use checksums
4e0c58bb79084ce208e4f46666b6343ad94533d7a8976a60d2af980a62c43e68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / opentelemetry_exporter_gcp_trace-1.15.0-py3-none-any.whl

Download URL opentelemetry_exporter_gcp_trace-1.15.0-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bab0bda41a74c9ece16611da2e1dd442d9d6f45238a734e62fee796e2c3b122c
BLAKE2b-256 checksum
How to use checksums
25f17e04fa6e95c233c83ef92ca298dc56150dfa363e325e6d7d5a074151fdcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for opentelemetry-exporter-gcp-trace 1.15.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page