Aleph Alpha (tracing)
Aleph Alpha (tracing)
Aleph Alpha provides enterprise AI models and APIs for chat, text generation, embeddings, evaluation, and explanation workflows. Respan instruments the official Aleph Alpha Python SDK so each model call is exported as a trace with prompts, completions, token usage, model metadata, tool definitions, and latency.
Set up Respan
Create an account at platform.respan.ai and grab an API key.
Run npx @respan/cli setup to set up with your coding agent.
Use Respan Gateway
See Aleph Alpha gateway setup to route Aleph Alpha model calls through the Respan gateway.
Example projects
Setup
Set environment variables
ALEPH_ALPHA_API_KEY is used for Aleph Alpha requests. RESPAN_API_KEY is used to export traces to Respan.
View your trace
Open the Traces page to see your auto-instrumented Aleph Alpha spans with prompts, completions, model names, token usage, and latency.
Covered calls
The Aleph Alpha instrumentor patches aleph_alpha_client.Client and AsyncClient calls for:
chatandcompletecomplete_with_streamingandchat_with_streamingembed,embeddings,semantic_embed,batch_semantic_embed, andinstructable_embedevaluateandexplain
Embedding spans capture the input and a vector summary without storing raw vector values.
Configuration
Attributes
In Respan()
Set defaults at initialization. These apply to all spans.
With propagate_attributes
Override attributes per request using a context scope.
Decorators (optional)
Decorators are not required. Aleph Alpha SDK calls are auto-traced after the instrumentor is activated. Use @workflow and @task when you want to group related calls into named workflows.