Skip to main content

Cloud Trace integration for OpenTelemetry

Project description

This library provides classes for exporting trace data to Google Cloud Trace.

Installation

pip install opentelemetry-exporter-cloud-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 (
    SimpleExportSpanProcessor,
)

trace.set_tracer_provider(TracerProvider())

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

References

Project details


Download files

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

Source Distribution

Built Distribution

File details

Details for the file opentelemetry-exporter-cloud-trace-0.10b0.tar.gz.

File metadata

  • Download URL: opentelemetry-exporter-cloud-trace-0.10b0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for opentelemetry-exporter-cloud-trace-0.10b0.tar.gz
Algorithm Hash digest
SHA256 2544e8e77c3a38cc67ab4ef071adedf0326d67aecbc658d339de0fb213c319d5
MD5 5be6c2ee07b9b16ffcb31cb644a83c3f
BLAKE2b-256 0ec7e3c2f0f655096a17b0dcd6a1a9fa10a344e3aad90f9976d8289e085a9758

See more details on using hashes here.

File details

Details for the file opentelemetry_exporter_cloud_trace-0.10b0-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_exporter_cloud_trace-0.10b0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9f9d5992d30b843705a4ab8194b138c8fa1fda01d587796e44b4687c422fcd9
MD5 aefa048c2a8e6b21fcddd446fc5d4a3b
BLAKE2b-256 ff882d6c0a2539bfb0fe09ef90b72d1b4efc98398e7e78e9b9084b11c8c4bb00

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page