Skip to main content

Drop-in OpenTelemetry observability for Python LLM apps. Standalone or with any OTLP backend.

Project description

bitfrost

bitfrost

Drop-in OpenTelemetry observability for Python LLM apps. Standalone or with any OTLP backend — runs on your machine, sends nothing unless you ask it to.

PyPI Python License: MIT CI


Bitfrost turns the OpenTelemetry spans your LLM libraries already emit into a clean, queryable event stream — in your terminal, in a local web dashboard, in SQLite, or shipped to any backend you choose. One line to start, zero accounts required.

import bitfrost

bitfrost.quickstart(agent="my-app")   # auto-detects openai / anthropic / litellm / smolagents
# ...your normal LLM calls now stream to the terminal, color-coded, with tokens + cost.
bitfrost serve — local web dashboard
bitfrost serve capture.db — a local, offline dashboard. No account, no upload.

Why bitfrost

  • Standalone first. Capture to your terminal, a JSONL file, or SQLite with zero configuration and zero network calls. Voight is one optional backend, never a requirement.
  • Drop-in. Built on the OpenTelemetry GenAI semantic conventions, so it works with the instrumentation libraries you already use — across both the v1.27 and v1.32+ attribute generations.
  • Batteries included. Five backends, four auto-instrument helpers, a rich CLI, an interactive TUI, and an offline web dashboard.
  • Private by default. Three privacy levels with PII scrubbing (12 patterns + Luhn) applied before any event leaves the process.
  • Never crashes your app. Every failure path degrades gracefully — a dead endpoint or a missing optional dependency never takes down your code.

Install

pip install bitfrost                 # core
pip install 'bitfrost[cli,serve]'    # + CLI, TUI and local web dashboard
pip install 'bitfrost[all]'          # everything

Python 3.10–3.13.

Capture anywhere

Pick a backend and pass it to any instrument helper (or quickstart). All concrete backends live under bitfrost.backends.*:

Backend Import Use it for
Console bitfrost.backends.console.ConsoleBackend live, color-coded terminal output
SQLite bitfrost.backends.sqlite.SQLiteBackend persistent local log; powers bitfrost serve
JSONL bitfrost.backends.jsonl.JSONLBackend one JSON object per line; replay-able
OTLP/HTTP bitfrost.backends.otlp.OTLPBackend POST events as JSON to any collector or webhook
Voight bitfrost.backends.voight.VoightBackend hosted dashboards (optional, opt-in)
Tee bitfrost.backends.tee.TeeBackend fan out to several backends at once
import bitfrost
from bitfrost.backends.sqlite import SQLiteBackend

bitfrost.instrument_openai(backend=SQLiteBackend("events.db"), agent="my-app")
# then:  bitfrost serve events.db

Fan out to several at once:

import bitfrost
from bitfrost.backends.tee import TeeBackend
from bitfrost.backends.console import ConsoleBackend
from bitfrost.backends.sqlite import SQLiteBackend

bitfrost.instrument_auto(
    backend=TeeBackend(ConsoleBackend(), SQLiteBackend("events.db")),
    agent="my-app",
)

Auto-instrument helpers

import bitfrost

bitfrost.instrument_openai()       # opentelemetry-instrumentation-openai
bitfrost.instrument_anthropic()    # opentelemetry-instrumentation-anthropic
bitfrost.instrument_litellm()      # litellm CustomLogger adapter
bitfrost.instrument_smolagents()   # openinference-instrumentation-smolagents
bitfrost.instrument_auto()         # instrument every supported lib that's installed

Already wiring OpenTelemetry yourself? Skip the helpers and attach the exporter to your own TracerProvider:

from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from bitfrost.exporter import BitfrostExporter
from bitfrost.backends.console import ConsoleBackend

provider = TracerProvider()
provider.add_span_processor(
    BatchSpanProcessor(BitfrostExporter(ConsoleBackend(), agent="my-app"))
)

CLI

bitfrost watch  capture.db        # live tail, one styled line per event
bitfrost replay capture.jsonl     # re-render a captured run start to finish
bitfrost query  capture.db "SELECT model, COUNT(*) FROM events GROUP BY model"
bitfrost vacuum capture.db --keep-days 7
bitfrost tui    capture.db        # full-screen interactive dashboard
bitfrost serve  capture.db        # local web dashboard at http://127.0.0.1:8080

Privacy

Three levels, applied in-process before any event is sent:

  • minimal — metadata only, no prompt/response content
  • standard (default) — content kept, PII scrubbed (12 patterns + credit-card Luhn check)
  • full — everything verbatim (use only for local debugging)
bitfrost.instrument_openai(privacy="minimal")

Standalone, or with Voight

Bitfrost is useful entirely on its own — the core has no dependency on any hosted service. If you want managed dashboards, team sharing, and per-user cost attribution, the optional VoightBackend ships your events to voight.xyz. Everything else stays exactly the same.

Documentation

License

MIT. Built by Voight.

Project details


Download files

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

Source Distribution

bitfrost-0.1.0b1.tar.gz (180.3 kB view details)

Uploaded Source

Built Distribution

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

bitfrost-0.1.0b1-py3-none-any.whl (154.7 kB view details)

Uploaded Python 3

File details

Details for the file bitfrost-0.1.0b1.tar.gz.

File metadata

  • Download URL: bitfrost-0.1.0b1.tar.gz
  • Upload date:
  • Size: 180.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for bitfrost-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 3705a1392de24b7e629377d869ceabab0dfe3c7a03823d82c5172ff59fa9a94b
MD5 d4e7107774b017986f80ee4e12538ff2
BLAKE2b-256 2be985bb853e9a502271b851fca0119ccafe3bb63efe1ff3a0e55f4b3230d748

See more details on using hashes here.

File details

Details for the file bitfrost-0.1.0b1-py3-none-any.whl.

File metadata

  • Download URL: bitfrost-0.1.0b1-py3-none-any.whl
  • Upload date:
  • Size: 154.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for bitfrost-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 50f9d5a0f7089f4fffcb8b662ffdc50dcde981b94bf56d94bb72c480a721bac8
MD5 9990b2da830e0c5223d522063323a0b7
BLAKE2b-256 6b62e8134bafbcf5307c3ca97f0a7e6341e6893341b61afa9c8e3a329a807fd7

See more details on using hashes here.

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