Skip to main content

Honeycomb OpenTelemetry distro which embeds the C++ SDK

Project description

honeycomb-pycpp

OSS Lifecycle Build

Python bindings for the OpenTelemetry C++ SDK. Provides high-performance tracing via a Pythonic interface, and ships as an OpenTelemetry distro for drop-in use with auto-instrumentation.

This library is experimental.

Installation

pip install honeycomb-pycpp

The wheel bundles the OpenTelemetry C++ SDK — no system-level dependencies required.

Configuration

The SDK is configured via a YAML file following the OpenTelemetry Configuration File Format. A default config is embedded in the package and used when no override is provided.

Environment variable Description
OTEL_CONFIG_FILE Path to a custom configuration YAML. Overrides the embedded default.
OTEL_EXPORTER_OTLP_ENDPOINT OTLP endpoint (default: http://localhost:4318)
OTEL_EXPORTER_OTLP_HEADERS Headers to send with OTLP requests
OTEL_RESOURCE_ATTRIBUTES Comma-separated resource attributes
OTEL_SERVICE_NAME Service name

Usage

As a distro (auto-instrumentation)

opentelemetry-instrument --service-name my-service python app.py

The distro registers itself automatically via entry points — no code changes required.

Tracing

import honeycomb_pycpp as otel

# Initialize from config file (or uses embedded default)
provider = otel.TracerProvider("path/to/otel.yaml")

tracer = provider.get_tracer("my-tracer")

with tracer.start_as_current_span("my-span") as span:
    span.set_attribute("key", "value")
    # ... do work ...

Metrics

Install the system metrics instrumentor:

pip install opentelemetry-instrumentation-system-metrics

Then activate it programmatically after initializing the MeterProvider:

import honeycomb_pycpp as otel
from opentelemetry import metrics
from opentelemetry.instrumentation.system_metrics import SystemMetricsInstrumentor

provider = otel.MeterProvider("path/to/otel.yaml")
metrics.set_meter_provider(provider)

SystemMetricsInstrumentor().instrument()

This collects CPU, memory, network, and other host metrics and exports them via the C++ SDK.

Logs

import honeycomb_pycpp as otel

provider = otel.LoggerProvider("path/to/otel.yaml")

logger = provider.get_logger("my-logger")

# Emit using keyword arguments
logger.emit(body="something happened", severity_number=otel.SeverityNumber.INFO)

# Emit using a LogRecord object
record = otel.LogRecord()
record.body = "request failed"
record.severity_number = otel.SeverityNumber.ERROR
record.attributes = {"user.id": "u-123", "http.status_code": 500}
logger.emit(record)

# Attach an exception
try:
    1 / 0
except ZeroDivisionError as exc:
    record = otel.LogRecord()
    record.body = "unhandled exception"
    record.severity_number = otel.SeverityNumber.ERROR
    record.exception = exc
    logger.emit(record)

provider.shutdown()

The LoggerProvider can also be used via bridges such that opentelemetry-instrumentation-logging work:

import logging
import honeycomb_pycpp as otel
from opentelemetry.instrumentation.logging.handler import LoggingHandler
from opentelemetry._logs import get_logger_provider

handler = LoggingHandler(logger_provider=otel.LoggerProvider("path/to/otel.yaml"))
logging.getLogger().addHandler(handler)

logging.getLogger("myapp").warning("watch out")

Deploying alongside the standard OpenTelemetry Python distro

Both honeycomb-pycpp and the standard opentelemetry-distro can be installed at the same time. When both are present, opentelemetry-instrument may pick up either distro. Use OTEL_PYTHON_DISTRO and OTEL_PYTHON_CONFIGURATOR to explicitly select which one runs.

pip install honeycomb-pycpp opentelemetry-distro

To use this C++ distro:

OTEL_PYTHON_DISTRO=cpp_distro \
OTEL_PYTHON_CONFIGURATOR=cpp_configurator \
opentelemetry-instrument python app.py

To use the standard Python SDK distro:

OTEL_PYTHON_DISTRO=distro \
OTEL_PYTHON_CONFIGURATOR=configurator \
opentelemetry-instrument python app.py

If neither variable is set and both distros are installed, the one selected is non-deterministic — always set them explicitly in multi-distro environments.

Current limitations

  • OpenTelemetry C++ ABI v2 not yet enabled, any features relying on it (i.e. links) are not supported

Building from source

Requirements: Python >= 3.10, CMake >= 3.15, C++17 compiler.

git clone https://github.com/honeycombio/honeycomb-pycpp
cd honeycomb-pycpp
pip install -r requirements-dev.txt
pip install -e .

To rebuild after C++ changes:

pip install -e . --force-reinstall --no-deps

To clean up cmake artifacts:

rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake build/ dist/ *.egg-info/ *.so

License

Apache License 2.0

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

honeycomb_pycpp-0.1.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (19.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

honeycomb_pycpp-0.1.5-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (18.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

honeycomb_pycpp-0.1.5-cp314-cp314-macosx_15_0_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.14macOS 15.0+ x86-64

honeycomb_pycpp-0.1.5-cp314-cp314-macosx_14_0_arm64.whl (14.3 MB view details)

Uploaded CPython 3.14macOS 14.0+ ARM64

honeycomb_pycpp-0.1.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (19.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

honeycomb_pycpp-0.1.5-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (18.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

honeycomb_pycpp-0.1.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (19.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

honeycomb_pycpp-0.1.5-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (18.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

honeycomb_pycpp-0.1.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (19.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

honeycomb_pycpp-0.1.5-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (18.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

honeycomb_pycpp-0.1.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (19.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

honeycomb_pycpp-0.1.5-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (18.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file honeycomb_pycpp-0.1.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for honeycomb_pycpp-0.1.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1fb3843bc0148f6d91827ebe3b2a07b8be123b441b9766e9e9f143b2d3220d66
MD5 8c8775e595c07de410c297ea6adcf570
BLAKE2b-256 d52a19c350b4873d1126430bfea0224ea7accbf8e0de1a01f9967a875924344b

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeycomb_pycpp-0.1.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yml on honeycombio/honeycomb-pycpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file honeycomb_pycpp-0.1.5-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for honeycomb_pycpp-0.1.5-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 35fca38062e47d8f3ebec50cb65a21173536b6e2259b5d14e58a29b0ca292e69
MD5 2e3e4453d39004c670129c50c3338c0d
BLAKE2b-256 5c932af9c761426af0610666fa4bb165893699ba05cf69d5de3b4217b3386686

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeycomb_pycpp-0.1.5-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: build-wheels.yml on honeycombio/honeycomb-pycpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file honeycomb_pycpp-0.1.5-cp314-cp314-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for honeycomb_pycpp-0.1.5-cp314-cp314-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 035c4c09b9bdbfcd279c0608fa3ba8cf88d74618a9aa753a4f99d879bfd9b6c7
MD5 4f5894fb8437837ae915a32fe3912425
BLAKE2b-256 cb990adb8788bb6eb54f3f74744830bab3d2837e2987ae6bcc42cc4eb9b5ca71

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeycomb_pycpp-0.1.5-cp314-cp314-macosx_15_0_x86_64.whl:

Publisher: build-wheels.yml on honeycombio/honeycomb-pycpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file honeycomb_pycpp-0.1.5-cp314-cp314-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for honeycomb_pycpp-0.1.5-cp314-cp314-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 afb7dea7ccaaf7498f6cb2044fda56c727aadbd733b682d01190ab555be68e71
MD5 119824b30cb2be1e97d8f43ac33585f1
BLAKE2b-256 94bc26da97a0679ec87bca48fe34f44736172fac42fc1fb14b41f4c64968a4da

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeycomb_pycpp-0.1.5-cp314-cp314-macosx_14_0_arm64.whl:

Publisher: build-wheels.yml on honeycombio/honeycomb-pycpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file honeycomb_pycpp-0.1.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for honeycomb_pycpp-0.1.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b9e593ade8d21b3be85ee8e5fb721821a1586cebde520a93e859ec5a2be9f03f
MD5 5b320e1150b679af8b5b2193d3eb0bc8
BLAKE2b-256 6c33efe316cc20c7616f804b56155eb50c4cabb6fe92cd1f65fb3e18f6e08289

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeycomb_pycpp-0.1.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yml on honeycombio/honeycomb-pycpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file honeycomb_pycpp-0.1.5-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for honeycomb_pycpp-0.1.5-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0d2604b3f297224a598cac821d9939a9ba6702140efb5577591573b3f36b3706
MD5 951118be70aa09d27ccda3bccc2f6e29
BLAKE2b-256 c47216a450fd45114b49f34e31f567433c470eb0089d549d16dadf3622939ddc

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeycomb_pycpp-0.1.5-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: build-wheels.yml on honeycombio/honeycomb-pycpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file honeycomb_pycpp-0.1.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for honeycomb_pycpp-0.1.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 09b860a8b0d159418b06f13dedd037e472a2519f83133a9df5249bd35c560e68
MD5 52ec2cba4fd19a34ec5bd8a631f477aa
BLAKE2b-256 49a882cc88dea4d80c90a71d7b5abcad9af75a2c1d65726e76727512ea5e97d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeycomb_pycpp-0.1.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yml on honeycombio/honeycomb-pycpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file honeycomb_pycpp-0.1.5-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for honeycomb_pycpp-0.1.5-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0cdf4a96b5e5448bdb56b7a890b37df4d80fb51bcdbd655fb55d6ea08d959ae9
MD5 264f5a4043b9505cc138c4fb0bd993b7
BLAKE2b-256 aa2ef190e9cc5047ef8cb8dc89b5163cc5f1a2f48824068bd9b5c1c5d8c1a039

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeycomb_pycpp-0.1.5-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: build-wheels.yml on honeycombio/honeycomb-pycpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file honeycomb_pycpp-0.1.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for honeycomb_pycpp-0.1.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 41509be780a568f4dce8d6243ebb5491b0c4747169273e574f0fa8171053f773
MD5 99307a528d218d8d882b39f648dfe419
BLAKE2b-256 fcf2204e56aae6d101398fc39c74d4137b3d98efdb1d2282c278567d584c5160

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeycomb_pycpp-0.1.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yml on honeycombio/honeycomb-pycpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file honeycomb_pycpp-0.1.5-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for honeycomb_pycpp-0.1.5-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2583d697750030a1941026f956baafa2f0639a357409330fe6a6b96a3a5d6a79
MD5 d99333082ae767d9826fe05afd6b72e5
BLAKE2b-256 1809008c2e59aeaec4669fb4aff0044e302001017ad606af55a607c9460a5ff8

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeycomb_pycpp-0.1.5-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: build-wheels.yml on honeycombio/honeycomb-pycpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file honeycomb_pycpp-0.1.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for honeycomb_pycpp-0.1.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 96b20db643d30bb4be2873640613e149ebbaace75a8d537bca053d1a9fac4441
MD5 1b25689210dc4d68b2747e351ee5f1eb
BLAKE2b-256 316b80619074115914df9d6b5941735ec78a50fb3cbbbbe34c1fad4c4c2eb5e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeycomb_pycpp-0.1.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yml on honeycombio/honeycomb-pycpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file honeycomb_pycpp-0.1.5-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for honeycomb_pycpp-0.1.5-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6215ed16494dcf272adae3d6cba98ab956e7bce46429cd9eda343262e3171a3b
MD5 2b0af96bd0bb518ed8a7bf13f0f71246
BLAKE2b-256 ca9eb4259211f7360138f635d2886fde69b0947a5060b63b092cda1e8c1fec71

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeycomb_pycpp-0.1.5-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: build-wheels.yml on honeycombio/honeycomb-pycpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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