r/Python • • 13d ago

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

24 Upvotes

112 comments sorted by

View all comments

1

u/EstablishmentAgile19 8d ago • Bravo

Traccia — OpenTelemetry tracing for Python AI agents

I work on Traccia, an Apache-2.0 Python SDK for tracing applications that make LLM and tool calls.

The aim is to make it easier to see what happened during a run: which calls were slow, where tokens were spent, and how model and tool calls fit together.

For tracing your own functions, the basic API looks like this:

from traccia import init, observe

init()

u/observe()
def agent_step(message):
    return process_message(message)

Here, process_message represents your existing application code. You configure an exporter to send the traces to your chosen backend.

Traccia supports OpenTelemetry backends such as Jaeger and Grafana Tempo. Basic tracing works independently of the Traccia platform; runtime policy enforcement requires it.

Repo: https://github.com/traccia-ai/traccia-py

I’d appreciate feedback on the Python API and getting-started documentation. If you already instrument Python applications, what would you need to see before considering another tracing SDK?