Skip to main content

OpenTelemetry Google Cloud Integration

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

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

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.0.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.0.0
File Size Uploaded Provenance
opentelemetry-exporter-gcp-trace-1.0.0.tar.gz 16.3 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 28.0 kB

Release files / opentelemetry-exporter-gcp-trace-1.0.0.tar.gz

Download URL opentelemetry-exporter-gcp-trace-1.0.0.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
eec4ebc13309e44b9ff998360a1e60ac3469fd67baa71c1911463e1bedde9070
BLAKE2b-256 checksum
How to use checksums
092058d7bb7f668fcf1234f6e52c9243c994bf6fcb5869a591fb7e728549b7fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

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

Download URL opentelemetry_exporter_gcp_trace-1.0.0-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d9b0114b64fa1f6eedefaaca3703c225af71420f026bcc64a19bc7a5f0b866f
BLAKE2b-256 checksum
How to use checksums
eab66bef10d2fcf20747bd00b46d928075a871c6f4353cec6194db07a68fd5a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

Security for opentelemetry-exporter-gcp-trace 1.0.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.

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