{"id":23857,"library":"honeycomb-beeline","title":"Honeycomb Beeline Python","description":"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.","status":"active","version":"3.6.0","language":"python","source_language":"en","source_url":"https://github.com/honeycombio/beeline-python","tags":["observability","honeycomb","tracing","instrumentation","telemetry"],"install":[{"cmd":"pip install honeycomb-beeline","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for Honeycomb API communication","package":"libhoney","optional":false},{"reason":"Used for monkey-patching and instrumentation","package":"wrapt","optional":false},{"reason":"HTTP library instrumentation","package":"requests","optional":true},{"reason":"Flask framework instrumentation","package":"flask","optional":true},{"reason":"Django framework instrumentation","package":"django","optional":true},{"reason":"SQLAlchemy database instrumentation","package":"sqlalchemy","optional":true}],"imports":[{"note":"beeline is the top-level module, not a submodule","wrong":"from beeline import beeline","symbol":"beeline","correct":"import beeline"},{"note":"init is a function on the beeline module, not a standalone import","wrong":"from beeline import init","symbol":"init","correct":"beeline.init(writekey=..., dataset=...)"}],"quickstart":{"code":"import beeline\nfrom beeline import metrics\n\n# Initialize the beeline\nbeeline.init(\n    writekey=os.environ.get('HONEYCOMB_WRITEKEY', ''),\n    dataset=os.environ.get('HONEYCOMB_DATASET', ''),\n    service_name='my-python-app'\n)\n\n@beeline.traced(name=\"my_function\")\ndef my_function():\n    # Add custom fields to the current span\n    beeline.add_context_field(\"key\", \"value\")\n    return \"hello\"\n\n# Add a metric counter\nmetrics.counter(\"my_counter\").add(1)","lang":"python","description":"Initialize the beeline with writekey and dataset (or classic key), trace a function, and add custom fields."},"warnings":[{"fix":"Upgrade your Python runtime to 3.7 or higher, and upgrade honeycomb-beeline to >=3.5.0.","message":"In v3.5.0, support for Python 3.5 and 3.6 was dropped. Upgrade to Python >=3.7.","severity":"breaking","affected_versions":"<3.5.0"},{"fix":"Ensure any direct libhoney usage is updated to work with libhoney >=2.0.0. If using beeline alone, no action needed.","message":"In 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.","severity":"breaking","affected_versions":"<3.3.1"},{"fix":"Ensure beeline.init() is called only once during application startup.","message":"Do not call beeline.init() more than once. Subsequent calls are silently ignored if the beeline is already initialized.","severity":"gotcha","affected_versions":"all"},{"fix":"Be explicit: pass writekey and dataset to beeline.init(). Unset environment variables if you want to rely on arguments.","message":"The beeline uses environment variables HONEYCOMB_WRITEKEY and HONEYCOMB_DATASET by default if not passed to init. If set, they override passed values.","severity":"gotcha","affected_versions":"all"},{"fix":"Switch to a standard Honeycomb API key (64 characters) instead of classic key.","message":"Classic ingest keys (32-character) are supported but deprecated in favour of API keys. Use a 64-character API key when possible.","severity":"deprecated","affected_versions":">=3.6.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install honeycomb-beeline' to install the package.","cause":"honeycomb-beeline is not installed.","error":"ModuleNotFoundError: No module named 'beeline'"},{"fix":"Use 'beeline.init(writekey=..., dataset=...)' with keyword arguments, not positional.","cause":"Wrong function signature. Users often try to import and call init from the submodule incorrectly.","error":"beeline.init() takes 0 positional arguments but 2 were given"},{"fix":"Provide a valid dataset name (string) to beeline.init(). Also check HONEYCOMB_DATASET environment variable is set if using default.","cause":"The dataset argument to beeline.init() is missing or empty.","error":"ValueError: Dataset must be a non-empty string"},{"fix":"Ensure the decorated function is synchronous and returns a value. For async functions, use @beeline.async_traced instead.","cause":"decorator @beeline.traced applied to a function that returns None or is a coroutine.","error":"TypeError: 'NoneType' object is not callable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}