Skip to main content

Google Cloud Trace exporter for OpenTelemetry

Project description

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

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

opentelemetry-exporter-gcp-trace-1.0.0rc0.tar.gz (16.3 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.0.0rc0.tar.gz.

File metadata

  • Download URL: opentelemetry-exporter-gcp-trace-1.0.0rc0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for opentelemetry-exporter-gcp-trace-1.0.0rc0.tar.gz
Algorithm Hash digest
SHA256 71062ba3415a242a45e1687de18090bb17054373fbf3bd44f8adb9afe431f23d
MD5 3ec6566d0f0e87011d5b4d06a098beb9
BLAKE2b-256 c9f9d60a720f7f7c511b38c4ceb2ee583d7996409aa894ab7dc23dcd1ac3e6a1

See more details on using hashes here.

File details

Details for the file opentelemetry_exporter_gcp_trace-1.0.0rc0-py3-none-any.whl.

File metadata

  • Download URL: opentelemetry_exporter_gcp_trace-1.0.0rc0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for opentelemetry_exporter_gcp_trace-1.0.0rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 33fda31859ae9fabf78d8dbb6c59273590916f89c4d072bb1939e653bc6da1d1
MD5 e6e94710cbf634111b579e5634302efc
BLAKE2b-256 44cd63f7edb3430fa78de7b17a2e8fcb0b09a7fca2a14db8b69dbc011851cf61

See more details on using hashes here.

Supported by

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