Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

opentelemetry-exporter-gcp-trace

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opentelemetry-exporter-gcp-trace

Google Cloud Trace exporter for OpenTelemetry

  • 1.7.0
  • PyPI
  • Socket score

Maintainers
2

OpenTelemetry Google Cloud Integration

.. image:: https://badge.fury.io/py/opentelemetry-exporter-gcp-trace.svg :target: https://badge.fury.io/py/opentelemetry-exporter-gcp-trace

.. image:: https://readthedocs.org/projects/google-cloud-opentelemetry/badge/?version=latest :target: https://google-cloud-opentelemetry.readthedocs.io/en/latest/?badge=latest :alt: 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 <https://pypi.org/project/opentelemetry-tools-google-cloud/>. For the Google Cloud Monitoring exporter, see opentelemetry-exporter-gcp-monitoring <https://pypi.org/project/opentelemetry-exporter-gcp-monitoring/>.

Installation

.. code:: bash

pip install opentelemetry-exporter-gcp-trace

Usage

.. code:: python

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

  • Cloud Trace <https://cloud.google.com/trace/>_
  • OpenTelemetry Project <https://opentelemetry.io/>_

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc