Guides
Send traces
SDKs, OpenTelemetry, and the REST API.
Panargus accepts traces in three ways. Each authenticates with an API key sent as a bearer token.
SDKs
Panargus is compatible with the Braintrust SDKs for Python and TypeScript. Set BRAINTRUST_API_URL to your Panargus address and keep the rest of your code as it is.
1import braintrust2from openai import OpenAI34logger = braintrust.init_logger(project="My Project")5client = braintrust.wrap_openai(OpenAI())67@braintrust.traced8def answer(question):9return client.chat.completions.create(model="gpt-4o-mini", messages=[{"role": "user", "content": question}])
Spans
Each call becomes a span with a type — task, llm, tool, function or score — and spans nest into a trace. Wrap your own steps with traced to see the plan, tool calls and answer as one tree.
OpenTelemetry
Send OTLP over HTTP to the /otel endpoint and name the project the spans belong to:
1export OTEL_EXPORTER_OTLP_ENDPOINT=https://api.panargus.dev/otel2export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <API key>, x-bt-parent=project_name:My Project"
REST API
Insert events directly, which is useful from languages without an SDK. See the REST API reference.