Skip to main content

Python SDK for observability, tracing, and evaluation of LLM applications

Project description

Tracewise

Tracewise is a Python SDK for observability, tracing, and evaluation of LLM applications, designed to be embedded directly into your codebase as a git submodule.

It provides:

  • End-to-end tracing for LLM calls and agent workflows
  • Unified evaluation across popular LLM evaluation frameworks
  • Lightweight HTTP exporters
  • Scalable storage with ClickHouse and Postgres
  • First-class integrations with LangChain-based LLMs

Why Tracewise?

  • 🧩 Submodule-first: Version observability alongside your application code
  • 🔍 Deep tracing: Automatic instrumentation for LLM calls and workflows
  • 📊 Evaluation-native: Built-in support for multiple evaluation frameworks
  • Low overhead: Async, HTTP-based exporters
  • 🧠 LLM-aware: Native wrappers for LangChain + Groq / OpenAI

Features

Tracing

  • Automatic tracing via decorators
  • LLM call metadata (model, tokens, latency)
  • Workflow and agent-level traces

Evaluation

Integrated support for:

Storage

  • ClickHouse → traces, spans, metrics
  • PostgreSQL → users, projects, API keys

LLM Integrations

  • LangChain-compatible wrappers
  • Supported providers:
    • Groq
    • OpenAI
    • Azure OpenAI

Installation (Git Submodule – Recommended)

Tracewise is intended to be used as a git submodule, not as a standalone pip dependency.

git submodule add https://github.com/your-org/tracewise.git tracewise

Quick Start

from tracewise.llm.langchain import ChatGroq
from tracewise import observe, init_observability
from tracewise.llm.openai import OpenAI, AzureOpenAI

# Use the observe decorator
@observe(agent_name)
def my_llm_function(prompt: str) -> str:
    # Your LLM logic here

    # Langchain
    llm = ChatGroq(model="openai/gpt-oss/120b", temperature=0)
    response = llm.invoke("Hi")

    # OpenAI
    llm = OpenAI()
    response = llm.responses.create(
      model="gpt-4o",
      messages=[{
        "role": "assistant", "content": "You're a helpful agent",
        "role": "user", "content": "Hi"
      }]
    )

    # Azure OpenAI
    llm = AzureOpenAI(api_key="", azure_endpoint="", api_version="")
    response = llm.chat.completions.create(
      model=<deployment_name>, 
      messages=[{
        "role": "assistant", "content": "You're a helpful agent",
        "role": "user", "content": "Hi"
      }]
    )

    return response

Configuration

Configure via environment variables:

export TRACEWISE_URL=http://localhost:8000
export TRACEWISE_API_KEY=your-api-key

Or programmatically:

init_observability(url="http://localhost:8000", api_key="your-api-key")

Git Submodule Usage

This repository can be used as a git submodule in your project:

git submodule add https://github.com/your-org/tracewise.git path/to/tracewise

Then install as an editable package:

pip install -e path/to/tracewise

Development

Setup

# Clone the repository
git clone https://github.com/your-org/tracewise.git
cd tracewise

# Install dependencies
pip install -e .

Testing

pytest

Linting

ruff check .
mypy src/

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

tracewise_ai-0.1.0.tar.gz (247.6 kB view details)

Uploaded Source

Built Distribution

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

tracewise_ai-0.1.0-py3-none-any.whl (52.7 kB view details)

Uploaded Python 3

File details

Details for the file tracewise_ai-0.1.0.tar.gz.

File metadata

  • Download URL: tracewise_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 247.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tracewise_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d9ed3fee07c0255d25f7751381ea56f7efbcc0aa79c41e57b851e021c4e3d3d7
MD5 f8e064f400213f6a89fc6baaee9b7b92
BLAKE2b-256 d622049ce431b80f630dfafe53bf696e8fc475c77d03de088c8ec3d51e3c3ce2

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracewise_ai-0.1.0.tar.gz:

Publisher: publish.yml on arash-arora/tracewise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tracewise_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tracewise_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 52.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tracewise_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09f931edc8174719ee5813bbbddaad3104cd80f5e8d1f2d6d3985a9f9b24f246
MD5 0868ae77887c21c83c56b2ecf96e9e53
BLAKE2b-256 018a3194b97b704fa40dda1c2a8a8d065feca9535ee0d99de1c37f0900e526c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracewise_ai-0.1.0-py3-none-any.whl:

Publisher: publish.yml on arash-arora/tracewise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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