Skip to main content
The Muxx Python SDK provides decorators for clean, declarative observability.

@observe

The @observe decorator is the simplest way to add tracing:

With Custom Name

With Metadata

@trace

Creates a new trace for the function:

Trace Options

@span

Creates a span within the current trace:

@generation

Explicitly marks a function as an LLM generation:

Combining Decorators

Decorators can be combined:

Async Decorators

All decorators work with async functions:

Class Methods

Decorators work on class methods:

Error Handling

Decorators automatically capture errors:
You can also add custom error handling: