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.

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

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
opentelemetry-exporter-gcp-trace-1.3.0.tar.gz 18.1 kB Details

Built distribution (wheel)

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

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

Release history Release notifications | RSS feed

1.15.0

2 release files

1.13.0

2 release files

1.12.0

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

This release

1.3.0 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

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