Registry / observability / honeycomb-beeline

honeycomb-beeline

JSON →
library3.6.0pypypi✓ verified 89d ago

Honeycomb's official instrumentation library for Python applications. Provides automatic tracing for web frameworks (Flask, Django, etc.), database queries, and HTTP calls. Current version 3.6.0, requires Python >=3.7,<4. Monthly releases with enhancements and bug fixes.

pip install honeycomb-beeline
INSTALL
IMPORT
SIG · HONEYCOMB-BEELINE
H
honeycomb-beeline
observabilitypythonv3.6.0
Install
2.6s avg
Import
238ms
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v3.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.256s · 22.3MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 2.6s · import 0.220s · 23MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

beeline
✓ import beeline
✗ from beeline import beeline
beeline is the top-level module, not a submodule
init
✓ beeline.init(writekey=..., dataset=...)
✗ from beeline import init
init is a function on the beeline module, not a standalone import

Initialize the beeline with writekey and dataset (or classic key), trace a function, and add custom fields.

import beeline from beeline import metrics # Initialize the beeline beeline.init( writekey=os.environ.get('HONEYCOMB_WRITEKEY', ''), dataset=os.environ.get('HONEYCOMB_DATASET', ''), service_name='my-python-app' ) @beeline.traced(name="my_function") def my_function(): # Add custom fields to the current span beeline.add_context_field("key", "value") return "hello" # Add a metric counter metrics.counter("my_counter").add(1)
Debug
Known issues
breakingIn v3.5.0, support for Python 3.5 and 3.6 was dropped. Upgrade to Python >=3.7.
fix
Upgrade your Python runtime to 3.7 or higher, and upgrade honeycomb-beeline to >=3.5.0.
affects: <3.5.0
breakingIn v3.3.1, libhoney minimum version bumped to 2.0.0, which changed the event submission API. If you use libhoney directly, review breaking changes.
fix
Ensure any direct libhoney usage is updated to work with libhoney >=2.0.0. If using beeline alone, no action needed.
affects: <3.3.1
gotchaDo not call beeline.init() more than once. Subsequent calls are silently ignored if the beeline is already initialized.
fix
Ensure beeline.init() is called only once during application startup.
affects: all
gotchaThe beeline uses environment variables HONEYCOMB_WRITEKEY and HONEYCOMB_DATASET by default if not passed to init. If set, they override passed values.
fix
Be explicit: pass writekey and dataset to beeline.init(). Unset environment variables if you want to rely on arguments.
affects: all
deprecatedClassic ingest keys (32-character) are supported but deprecated in favour of API keys. Use a 64-character API key when possible.
fix
Switch to a standard Honeycomb API key (64 characters) instead of classic key.
affects: >=3.6.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'beeline'
honeycomb-beeline is not installed.
fix
Run 'pip install honeycomb-beeline' to install the package.
beeline.init() takes 0 positional arguments but 2 were given
Wrong function signature. Users often try to import and call init from the submodule incorrectly.
fix
Use 'beeline.init(writekey=..., dataset=...)' with keyword arguments, not positional.
ValueError: Dataset must be a non-empty string
The dataset argument to beeline.init() is missing or empty.
fix
Provide a valid dataset name (string) to beeline.init(). Also check HONEYCOMB_DATASET environment variable is set if using default.
TypeError: 'NoneType' object is not callable
decorator @beeline.traced applied to a function that returns None or is a coroutine.
fix
Ensure the decorated function is synchronous and returns a value. For async functions, use @beeline.async_traced instead.
Upgrade
Version history
3.6.0latest on PyPI · released Mar 7, 2024
Audit
Dependencies
libhoneyrequiredCore dependency for Honeycomb API communication
wraptrequiredUsed for monkey-patching and instrumentation
requestsoptionalHTTP library instrumentation
flaskoptionalFlask framework instrumentation
djangooptionalDjango framework instrumentation
sqlalchemyoptionalSQLAlchemy database instrumentation
Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
2
Resources
honeycomb-beeline — pip install honeycomb-beeline · libregistry