Observability and tracing for OpenDunes requests with Arize AX — sent for you, or from your own code.
Arize AX is an LLM observability platform that traces requests, evaluates outputs, and surfaces regressions across model versions. Your OpenDunes requests reach it two ways.
Add Arize AX as a destination once, with a management key, and every request is sent to your Arize space as a trace — model, provider, tokens, cost in DA, input and output — with no change to your code:
curl https://opendunes.com/v1/observability/destinations \
-H "Authorization: Bearer $OPENDUNES_MANAGEMENT_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Arize",
"type": "arize",
"config": { "apiKey": "…", "spaceKey": "…", "modelId": "souk-bot" }
}'The settings and what Arize receives are on the Arize AX destination page.
To add spans of your own around OpenDunes calls, instrument them with Arize's OpenTelemetry SDK:
import os
from openai import OpenAI
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from arize.otel import register
# Configure Arize OTEL exporter
tracer_provider = register(
space_id=os.environ["ARIZE_SPACE_ID"],
api_key=os.environ["ARIZE_API_KEY"],
model_id="opendunes-app",
)
tracer = trace.get_tracer(__name__)
client = OpenAI(
base_url="https://opendunes.com/v1",
api_key=os.environ["OPENDUNES_API_KEY"],
)
with tracer.start_as_current_span("chat_completion") as span:
span.set_attribute("llm.model", "anthropic/claude-sonnet-5")
span.set_attribute("llm.provider", "opendunes")
resp = client.chat.completions.create(
model="anthropic/claude-sonnet-5",
messages=[{"role": "user", "content": "What is the Casbah of Algiers?"}],
)
span.set_attribute("llm.output", resp.choices[0].message.content)
span.set_attribute("llm.tokens.prompt", resp.usage.prompt_tokens)
span.set_attribute("llm.tokens.completion", resp.usage.completion_tokens)
print(resp.choices[0].message.content)