Skip to content

Get Started with Tracing

This guide walks you through sending your first trace to XeroML. You can use an AI coding agent to instrument your app automatically, or follow the manual steps for your framework.

Prerequisites

  1. Create a XeroML account or self-host XeroML

  2. Generate API keys from your project settings

    You’ll need both a secret key (sk-xm-...) and a public key (pk-xm-...).

  3. Set environment variables in your project

    Terminal window
    XEROML_SECRET_KEY="sk-xm-..."
    XEROML_PUBLIC_KEY="pk-xm-..."
    XEROML_BASE_URL="https://cloud.xeroml.com"

Instrument Your Application

Install the XeroML SDK:

Terminal window
pip install xeroml

Replace your OpenAI import with the XeroML wrapper:

from xeroml.openai import openai
# Use exactly like the standard openai client
response = openai.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello, world!"}]
)

All OpenAI calls are automatically traced — no other changes needed.

Additional Integrations

XeroML also supports:

IntegrationLink
LlamaIndex/integrations/frameworks/llamaindex
CrewAI/integrations/frameworks/crewai
Ollama/integrations/model-providers/ollama
LiteLLM/integrations/gateways/litellm
AutoGen/integrations/frameworks/autogen
Google ADK/integrations/frameworks/google-adk

View all integrations

Verify Your Trace

After running your instrumented code, open the XeroML dashboard and navigate to Traces. Your trace should appear within a few seconds.

Next Steps

Now that you’re sending traces, explore these features to get more value: