Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

opentelemetry-samplers-python

NOTE: This is experimental and is subject to change a lot or go away entirely. Use with caution.

Honeycomb Samplers for use with the OpenTelemetry Python SDK

Samplers

Deterministic Sampler

This is a port of the deterministic sampler included in our Python Beeline. To use it, just instantiate it with a sample rate:

from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
    ConsoleSpanExporter,
    SimpleExportSpanProcessor,
)
from opentelemetry.ext.honeycomb.sampling import DeterministicSampler

sampler = DeterministicSampler(5) # every trace has a 20% chance of being sampled
trace.set_tracer_provider(TracerProvider(sampler=sampler))

trace.get_tracer_provider().add_span_processor(
    SimpleExportSpanProcessor(ConsoleSpanExporter())
)

tracer = trace.get_tracer(__name__)

with tracer.start_as_current_span("Test span"):
    with tracer.start_as_current_span("bar"):
        with tracer.start_as_current_span("baz"):
            print("Hello world from OpenTelemetry Python!")

Metadata

Release files for opentelemetry-ext-honeycomb-samplers 0.3b0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opentelemetry-ext-honeycomb-samplers 0.3b0
File Size Uploaded Provenance
opentelemetry-ext-honeycomb-samplers-0.3b0.tar.gz 2.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for opentelemetry-ext-honeycomb-samplers 0.3b0
File Interpreter ABI Platform
opentelemetry_ext_honeycomb_samplers-0.3b0-py3-none-any.whl Python 3 none any Details

Total release size: 10.1 kB

Release files / opentelemetry-ext-honeycomb-samplers-0.3b0.tar.gz

Download URL opentelemetry-ext-honeycomb-samplers-0.3b0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
80077df508934a137b0f2372982b0aa0f3bd5d5ed93545babd13f6a3fc1271e1
BLAKE2b-256 checksum
How to use checksums
f46ca1fc6943def36172ea38877dac0119604db14aa063b4962b8fd7db225545
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.7.9

Release files / opentelemetry_ext_honeycomb_samplers-0.3b0-py3-none-any.whl

Download URL opentelemetry_ext_honeycomb_samplers-0.3b0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e185ee13f24cb4b6590d91d766df768b78e8d0b4761bf56b88fc36247460f32
BLAKE2b-256 checksum
How to use checksums
7f517bcf63806c41c683b1d5704054204892bcb25d3c075212f2a0969615f054
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.7.9

Security for opentelemetry-ext-honeycomb-samplers 0.3b0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page