Skip to main content

Uptrace exporter for OpenTelemetry

Project description

Uptrace Python exporter for OpenTelemetry

Introduction

uptrace-python is an exporter for OpenTelemetry that sends your traces and metrics to Uptrace.dev.

Installation

pip install uptrace

Trace exporter

Trace exporter can be configured with the following code:

from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchExportSpanProcessor
import uptrace

# The preferred tracer implementation must be set, as the opentelemetry-api
# defines the interface with a no-op implementation.
trace.set_tracer_provider(TracerProvider())

# Exporter receives the spans and sends them to Uptrace.dev.
exporter = uptrace.trace.Exporter(
    dsn="" # copy your project DSN here or use UPTRACE_DSN env var
)

span_processor = BatchExportSpanProcessor(
    exporter, max_queue_size=10000, max_export_batch_size=10000
)
trace.get_tracer_provider().add_span_processor(span_processor)

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

uptrace-0.1.0b2.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file uptrace-0.1.0b2.tar.gz.

File metadata

  • Download URL: uptrace-0.1.0b2.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

File hashes

Hashes for uptrace-0.1.0b2.tar.gz
Algorithm Hash digest
SHA256 f4c30f871014a03ca5d54640a5d45e931993e830c8e35a6394cad6879439d1cf
MD5 94c52dfe29bc64e488ffcf6a745666eb
BLAKE2b-256 a55071bac17bf4dc37ceec5b950d1860c017a3287dd6dbaa2bba46ae0ba9cdb7

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