The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
{
"resourceSpans": [
{
"resource": {
"attributes": [
{
"key": "telemetry.sdk.language",
"value": {
"stringValue": "python"
}
},
{
"key": "telemetry.sdk.name",
"value": {
"stringValue": "opentelemetry"
}
},
{
"key": "telemetry.sdk.version",
"value": {
"stringValue": "1.45.0"
}
},
{
"key": "service.instance.id",
"value": {
"stringValue": "070c0b51-82ca-4b60-baa3-95fcae85ee51"
}
},
{
"key": "telemetry.auto.version",
"value": {
"stringValue": "0.66b0"
}
},
{
"key": "service.name",
"value": {
"stringValue": "unknown_service:python3"
}
}
]
},
"scopeSpans": [
{
"scope": {
"name": "litellm.gateway.client"
},
"spans": [
{
"traceId": "c9e85daf52f338211b3d8ee18906c14f",
"spanId": "0dd2cca62dcb29a5",
"parentSpanId": "a73b3b1f5911f321",
"name": "gateway.request",
"kind": 3,
"startTimeUnixNano": "1791061316015649000",
"endTimeUnixNano": "1791061319566768000",
"attributes": [
{
"key": "litellm.gateway.attempt",
"value": {
"boolValue": true
}
},
{
"key": "http.request.method",
"value": {
"stringValue": "POST"
}
},
{
"key": "url.full",
"value": {
"stringValue": "http://localhost:4002/v1/chat/completions"
}
},
{
"key": "server.address",
"value": {
"stringValue": "localhost"
}
},
{
"key": "http.response.status_code",
"value": {
"intValue": "200"
}
},
{
"key": "litellm.call_id",
"value": {
"stringValue": "170a81eb-86c9-44fe-b63d-8700627f07a7"
}
}
],
"status": {},
"flags": 256
}
]
},
{
"scope": {
"name": "openinference.instrumentation.openai",
"version": "0.1.63"
},
"spans": [
{
"traceId": "c9e85daf52f338211b3d8ee18906c14f",
"spanId": "a73b3b1f5911f321",
"parentSpanId": "771415ea54fc15af",
"name": "ChatCompletion",
"kind": 1,
"startTimeUnixNano": "1791061316006161000",
"endTimeUnixNano": "1791061319570167000",
"attributes": [
{
"key": "llm.system",
"value": {
"stringValue": "openai"
}
},
{
"key": "input.value",
"value": {
"stringValue": "{\"model\": \"openai/gpt-6-luna\", \"messages\": [{\"role\": \"user\", \"content\": \"What is an agent trace?\"}]}"
}
},
{
"key": "input.mime_type",
"value": {
"stringValue": "application/json"
}
},
{
"key": "output.value",
"value": {
"stringValue": "{\"id\":\"chatcmpl-EV19gSXpccLloSr3XAbDLESfYKYBD\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"message\":{\"content\":\"An **agent trace** is a record of an AI agent\u2019s execution: the steps it took while working on a task.\\n\\nA trace might include:\\n- The user\u2019s request\\n- The agent\u2019s actions, such as calling a search tool or running code\\n- Tool results or other observations\\n- The agent\u2019s final response\\n- Timing, errors, or other debugging details\\n\\nFor example: *receive a question \u2192 search the web \u2192 read results \u2192 summarize them*.\\n\\nTraces help developers understand, debug, and evaluate an agent\u2019s behavior. They usually capture observable actions and outputs\u2014not necessarily the agent\u2019s private internal reasoning.\",\"role\":\"assistant\",\"annotations\":[],\"provider_specific_fields\":{\"refusal\":null}},\"provider_specific_fields\":{}}],\"created\":1791061316,\"model\":\"openai/gpt-6-luna\",\"object\":\"chat.completion\",\"service_tier\":\"default\",\"usage\":{\"completion_tokens\":192,\"prompt_tokens\":12,\"total_tokens\":204,\"completion_tokens_details\":{\"accepted_prediction_tokens\":0,\"audio_tokens\":0,\"reasoning_tokens\":57,\"rejected_prediction_tokens\":0},\"prompt_tokens_details\":{\"audio_tokens\":0,\"cache_write_tokens\":0,\"cached_tokens\":0,\"cache_creation_tokens\":0}}}"
}
},
{
"key": "output.mime_type",
"value": {
"stringValue": "application/json"
}
},
{
"key": "llm.invocation_parameters",
"value": {
"stringValue": "{\"model\": \"openai/gpt-6-luna\"}"
}
},
{
"key": "llm.input_messages.0.message.role",
"value": {
"stringValue": "user"
}
},
{
"key": "llm.input_messages.0.message.content",
"value": {
"stringValue": "What is an agent trace?"
}
},
{
"key": "llm.model_name",
"value": {
"stringValue": "openai/gpt-6-luna"
}
},
{
"key": "llm.token_count.total",
"value": {
"intValue": "204"
}
},
{
"key": "llm.token_count.prompt",
"value": {
"intValue": "12"
}
},
{
"key": "llm.token_count.completion",
"value": {
"intValue": "192"
}
},
{
"key": "llm.token_count.prompt_details.cache_read",
"value": {
"intValue": "0"
}
},
{
"key": "llm.token_count.prompt_details.cache_write",
"value": {
"intValue": "0"
}
},
{
"key": "llm.token_count.prompt_details.audio",
"value": {
"intValue": "0"
}
},
{
"key": "llm.token_count.completion_details.reasoning",
"value": {
"intValue": "57"
}
},
{
"key": "llm.token_count.completion_details.audio",
"value": {
"intValue": "0"
}
},
{
"key": "llm.output_messages.0.message.role",
"value": {
"stringValue": "assistant"
}
},
{
"key": "llm.output_messages.0.message.content",
"value": {
"stringValue": "An **agent trace** is a record of an AI agent\u2019s execution: the steps it took while working on a task.\n\nA trace might include:\n- The user\u2019s request\n- The agent\u2019s actions, such as calling a search tool or running code\n- Tool results or other observations\n- The agent\u2019s final response\n- Timing, errors, or other debugging details\n\nFor example: *receive a question \u2192 search the web \u2192 read results \u2192 summarize them*.\n\nTraces help developers understand, debug, and evaluate an agent\u2019s behavior. They usually capture observable actions and outputs\u2014not necessarily the agent\u2019s private internal reasoning."
}
},
{
"key": "llm.finish_reason",
"value": {
"stringValue": "stop"
}
},
{
"key": "openinference.span.kind",
"value": {
"stringValue": "LLM"
}
}
],
"status": {
"code": 1
},
"flags": 256
}
]
},
{
"scope": {
"name": "__main__"
},
"spans": [
{
"traceId": "c9e85daf52f338211b3d8ee18906c14f",
"spanId": "771415ea54fc15af",
"name": "research_agent",
"kind": 1,
"startTimeUnixNano": "1791061315990190000",
"endTimeUnixNano": "1791061319570213000",
"attributes": [
{
"key": "gen_ai.agent.name",
"value": {
"stringValue": "research_agent"
}
},
{
"key": "openinference.span.kind",
"value": {
"stringValue": "AGENT"
}
},
{
"key": "input.value",
"value": {
"stringValue": "What is an agent trace?"
}
},
{
"key": "output.value",
"value": {
"stringValue": "An **agent trace** is a record of an AI agent\u2019s execution: the steps it took while working on a task.\n\nA trace might include:\n- The user\u2019s request\n- The agent\u2019s actions, such as calling a search tool or running code\n- Tool results or other observations\n- The agent\u2019s final response\n- Timing, errors, or other debugging details\n\nFor example: *receive a question \u2192 search the web \u2192 read results \u2192 summarize them*.\n\nTraces help developers understand, debug, and evaluate an agent\u2019s behavior. They usually capture observable actions and outputs\u2014not necessarily the agent\u2019s private internal reasoning."
}
}
],
"status": {},
"flags": 256
}
]
}
]
}
]
}