from muxx import trace@trace("document-pipeline")def process_document(doc_id: str): # All operations inside create a new trace extract_text(doc_id) analyze_content(doc_id) generate_summary(doc_id)
from muxx import generation@generation(model="gpt-4o", provider="openai")def call_llm(prompt: str): # Useful when using a custom LLM client # that Muxx doesn't automatically detect pass
from muxx import observe@observe("risky-operation")def risky_operation(): raise ValueError("Something went wrong") # Error is captured in the trace with full stack trace