Local-first observability for LLM applications
Project description
tracellm
Lightweight tracing for LLM applications. One decorator — every API interaction logged locally, queryable from your terminal.
No backend. No signup. Nothing leaves your machine.
Install
pip install tracellm
Usage
from tracellm import trace import groq
client = groq.Groq(api_key="your-key")
@trace def llm_call(model="llama-3.1-8b-instant", messages=[{"role": "user", "content": "hello"}]): return client.chat.completions.create(model=model, messages=messages)
llm_call()
That's it. Every call is traced automatically.
Query traces from terminal
python -m tracellm.cli --Status failed python -m tracellm.cli --Latency 2.0 python -m tracellm.cli --Model llama-3.1-8b-instant python -m tracellm.cli --Status failed --Latency 1.5
What gets captured
- Model, prompt, response
- Tokens used, latency, finish reason
- Error type and message on failures
- Timestamp for every call
Limitations
Storage is append-only JSON lines. Latency query supports >= for latency, exact match for everything else. Early days.
Roadmap
- Binary storage for faster querying at scale
- Cost calculation per model
- Terminal dashboard
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tracellm-0.2.0.tar.gz.
File metadata
- Download URL: tracellm-0.2.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5050bce52586b08754032eb6a2b0d60fb97064c45d691d34754035c173f98ff5
|
|
| MD5 |
3942cee75c2975296a221ecb017d1793
|
|
| BLAKE2b-256 |
0d3703619a1ccae1fc918350ab672adec055d0ddb80392a239dd01bfce5f95d2
|
File details
Details for the file tracellm-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tracellm-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e6b917218f8025850af7c95f15eaf504c3abc577e1874421cbd8451232e0481
|
|
| MD5 |
e4976d7f7610799d6c542fea49bebe3a
|
|
| BLAKE2b-256 |
7377eed00e4ae859b9057c584ea61305be9be4c342e15cac1cc4cca4122370dd
|