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.3.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.3.0
File Size Uploaded Provenance Actions
opentelemetry-exporter-gcp-trace-1.3.0.tar.gz 18.1 kB Without provenance Details for opentelemetry-exporter-gcp-trace-1.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 31.7 kB

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

Download URL opentelemetry-exporter-gcp-trace-1.3.0.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5eb5c1025e79da8dccda51fc85c391256a18d6390cb7beff76cfd8a5b4426653
BLAKE2b-256 checksum
How to use checksums
906c358be59206dfa8c1beafc4a6f6f09218ad3e11f17d86dda43ba32ec28e12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.9

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

Download URL opentelemetry_exporter_gcp_trace-1.3.0-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d4c2be3ca06aa9cf3c15b2fd8b8d34456694fa58f09ded937740714897bf4f4
BLAKE2b-256 checksum
How to use checksums
7e9d187ca69bb5d98cd58a5e10158f82bca74bcf48ec60261ade99d0cc619a37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.9

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