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.
pip install honeycomb-pycppThe wheel bundles the OpenTelemetry C++ SDK — no system-level dependencies required.
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 |
opentelemetry-instrument --service-name my-service python app.pyThe distro registers itself automatically via entry points — no code changes required.
import otel_cpp_tracer 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 ...- Tracing only — metrics and logs are not yet supported
- Links require OpenTelemetry C++ ABI v2 (not yet enabled)
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-depsTo clean up cmake artifacts:
rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake build/ dist/ *.egg-info/ *.soApache License 2.0