Skip to main content

TraceLite

Lightweight LLM observability SDK with vector semantic caching using PostgreSQL (pgvector) and Redis.

Features

  • Async Telemetry: Logs token usage, cost, latency, and TTFT in background threads.
  • Two-Tier Caching: Exact hash caching (Redis) + Semantic vector caching (pgvector).
  • Fallback Token Counting: Uses tiktoken if native usage streaming metadata is omitted.

Quick Start

docker-compose up -d
pip install -e .

---

#### `.github/workflows/publish.yml`
```yaml
name: Publish TraceLite to PyPI

on:
  release:
    types: [published]

jobs:
  pypi-publish:
    name: Build and publish TraceLite
    runs-on: ubuntu-latest
    environment:
      name: pypi
      url: https://pypi.org/p/tracelite
    permissions:
      id-token: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Install build dependencies
        run: |
          python -m pip install --upgrade pip
          python -m pip install build

      - name: Build source distribution and wheel
        run: python -m build

      - name: Publish package distributions to PyPI
        uses: pypa/gh-action-pypi-publish@release/v1

Release files for tracelite 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tracelite 0.1.3
File Size Uploaded
tracelite-0.1.3.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tracelite 0.1.3
File Interpreter ABI Platform
tracelite-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 14.7 kB

Release files / tracelite-0.1.3.tar.gz

Download URL tracelite-0.1.3.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b68593847bc756be177151a39329390deee097b1442e190548745c3d4e068179
BLAKE2b-256 checksum
How to use checksums
15c314336bea2956ebc40812ca8a4ea1aef181f06383c931c4d30091d5f8248d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / tracelite-0.1.3-py3-none-any.whl

Download URL tracelite-0.1.3-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25dc3a8ca6a66dd68641c7500b7764a5a00e08ea43481790df2281eb1b5c8556
BLAKE2b-256 checksum
How to use checksums
dfb67bc1f46406247e8de33ce3f441b6a1aae65d20bbc41c706ff8254a467fda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

This release

0.1.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page