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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opentelemetry_exporter_gcp_trace-1.15.0.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file opentelemetry_exporter_gcp_trace-1.15.0.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_exporter_gcp_trace-1.15.0.tar.gz
Algorithm Hash digest
SHA256 70db6b807756c0815dce6af2f230663a07983f73bde0b7302e21f3a241b512cd
MD5 1e078cbaa135a6e99207bd13cd74d046
BLAKE2b-256 4e0c58bb79084ce208e4f46666b6343ad94533d7a8976a60d2af980a62c43e68

See more details on using hashes here.

File details

Details for the file opentelemetry_exporter_gcp_trace-1.15.0-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_exporter_gcp_trace-1.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bab0bda41a74c9ece16611da2e1dd442d9d6f45238a734e62fee796e2c3b122c
MD5 02ac98624c39b75dc51a1589118d1982
BLAKE2b-256 25f17e04fa6e95c233c83ef92ca298dc56150dfa363e325e6d7d5a074151fdcb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.15.0 This release

2 files

1.14.0

2 files

1.13.0

2 files

1.12.0

2 files

1.11.0

2 files

1.10.0

2 files

1.9.0

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page