Skip to main content
orq.* attributes are OpenTelemetry span attributes emitted by the AI Gateway on every trace span. They appear in the Traces panel, in LLM webhook payloads, and in trace exports. Core attributes appear on every span; attributes in Invoked resources, Guardrails, and Routing sections appear only when the relevant feature was active.

Quick reference

What to findAttributes
Span typeorq.span_type
Modelorq.model.id, orq.model.provider, orq.model.type, orq.model.is_private
Costorq.billing.*
Tenant scopeorq.organization_id, orq.workspace_id, orq.project_id, orq.identity_id, orq.api_key_id, orq.product
Invoked resourcesorq.deployment_id, orq.deployment_key, orq.deployment.variant_id, orq.prompt_id, orq.knowledge_id, orq.memory_store_id, orq.playground_id, orq.dataset_id, orq.schedule_id, orq.workflow.run_id
Conversationorq.thread_id, orq.session_id, orq.agent_execution_id
Custom metadataorq.metadata, orq.tags, orq.variables, orq.object_name
Guardrail rules and routing rulesorq.routing_rule.id, orq.guardrail_rule.ids, orq.guardrail.*
Guardrailsorq.evaluator.id, orq.evaluator.type, orq.evaluator.version, orq.evaluator.output_type, orq.evaluation.stage
Routing and fallbackorq.fallback.*, orq.auto_router.*, orq.load_balancer.*
Framework sourceorq.trace.framework.name

Span type

Classifies the kind of work a span represents. Use orq.span_type to filter spans by operation type in the Traces panel or LLM webhook payloads.
AttributeDescription
orq.span_typeSpan operation type
Common values:
ValueMeaning
span.chat_completionChat completion routed through the AI Gateway
span.responsesResponses API call
span.embeddingEmbeddings
span.retrievalKnowledge retrieval
span.evaluatorEvaluator or guardrail
span.agentAgent step within a run
span.agent_executionFull agent run
span.toolTool execution
span.fallback_selectedFallback model selected
span.auto_routerAuto-router decision
span.load_balancerLoad balancer decision

Model

AttributeDescription
orq.model.idOrq.ai model catalog ID (UUID). For the human-readable model name, see gen_ai.response.model below.
orq.model.providerProvider, e.g. "openai", "anthropic"
orq.model.typeModel type, e.g. "chat", "embedding"
orq.model.is_privateWhether a workspace-private model was used (a model added to the workspace model catalog, not a shared Orq.ai model)
Related standard fields:
  • gen_ai.request.model: model requested by the caller
  • gen_ai.response.model: model that actually ran; use this for the human-readable model name, as it reflects the true model after any routing or fallback

Cost and billing

These attributes appear in the Economics panel, trace list, and LLM webhook payloads.
AttributeDescription
orq.billing.total_costTotal cost for the span (float, USD)
orq.billing.input_costInput token cost (float, USD)
orq.billing.output_costOutput token cost (float, USD)
orq.billing.cache_read_costPrompt cache read cost (float, USD)
orq.billing.cache_write_costPrompt cache write cost (float, USD)
orq.billing.reasoning_costReasoning token cost (float, USD)
orq.billing.audio_input_costAudio input cost (float, USD)
orq.billing.audio_output_costAudio output cost (float, USD)
orq.billing.web_search_costWeb search fees (float, USD)
orq.billing.billableWhether this span counts toward workspace usage billing (bool). false for cached responses and internal evaluator calls.
orq.billing.pricing_tierPricing tier: "standard", "extended_128k", "extended_200k" (string)
orq.billing.threshold_exceededA configured budget threshold was exceeded (bool). The call still completes; this flag signals that alerting or enforcement rules may apply.
orq.billing.integration_idID of the provider integration (the API key configuration for a specific provider account) used to look up pricing rates (string)
Token counts live under gen_ai.usage.*, not orq.*.

Tenant scope

Scope a trace to the organization, workspace, and product surface.
AttributeDescription
orq.organization_idOrganization the call belongs to
orq.workspace_idWorkspace
orq.project_idProject within the workspace
orq.identity_idEnd-user Identity (preferred)
orq.contact_idLegacy alias for identity; same meaning as orq.identity_id
orq.api_key_idAPI key used for the request
orq.productProduct surface, e.g. "router", "agents", "spreadsheets"
Filter traces by project, or assign cost to an Identity.

Invoked resources

Links a trace to the Orq.ai resources that served the request.
AttributeDescription
orq.deployment_idDeployment ID
orq.deployment_keyDeployment key/slug
orq.deployment.variant_idVariant that served the request
orq.prompt_idPrompt resource
orq.knowledge_idKnowledge base used in retrieval
orq.memory_store_idMemory store ID, present on spans that use memory-augmented retrieval
orq.playground_idPlayground session ID, present on spans initiated from the Playground
orq.dataset_idDataset ID, present on spans triggered by evals or experiments
orq.schedule_idSchedule ID, present on spans triggered by a schedule
orq.workflow.run_idWorkflow run
Use these to answer: which deployment, prompt, knowledge base, schedule, or workflow produced this trace? To identify which agent execution produced this trace, use orq.agent_execution_id.

Conversation and session grouping

AttributeDescription
orq.thread_idThread ID: groups turns within a single conversation
orq.session_idSession ID: groups across multiple threads or conversations
orq.agent_execution_idA single Agent run
orq.thread_id groups individual turns into a conversation; orq.session_id groups across conversations for broader session tracking. Pass orq.thread_id to group related requests into a conversation thread.
The standard OTel field gen_ai.conversation.id is also supported. When both are present, orq.thread_id takes precedence as the first-class thread identifier in the UI and trace exports.

Custom metadata and attribution

AttributeDescription
orq.metadataCustom key-value metadata (JSON string on the span)
orq.tagsRequest-level tags for filtering and reporting
orq.variablesTemplate variables passed by the caller to fill prompt placeholders for this call (JSON string)
orq.object_nameDisplay name for the traced object
Arbitrary key-value context attached to the span, such as customer_tier or feature_flag. Filterable in the Traces panel.

Guardrail rules and routing rules

These attributes reflect static rule enforcement: which routing rule or guardrail matched this request. For dynamic model selection (fallback, auto-router, load balancer), see Routing, fallback, and model selection.
AttributeDescription
orq.routing_rule.idRouting rule that matched
orq.guardrail_rule.idsIDs of Guardrail rules that matched this request (array of strings)
orq.guardrail.enabledSpan is a blocking guardrail check
orq.guardrail.actionAction taken, e.g. "block"
Use these to debug why a request was blocked or routed by a rule.

Guardrails

On Guardrail spans:
AttributeDescription
orq.evaluator.idGuardrail ID
orq.evaluator.typeGuardrail type, e.g. "llm_judge", "regex", "similarity"
orq.evaluator.versionGuardrail version
orq.evaluator.output_typeOutput type, e.g. "boolean", "score", "label"
orq.evaluation.stage"input" when the guardrail ran before the model call (checking the prompt); "output" when it ran after (checking the response)
Score, pass, and fail results also appear via standard gen_ai.evaluation.* attributes.

Routing, fallback, and model selection

These attributes reflect dynamic model selection at runtime: which model was actually chosen, and why it differed from the one requested. For static rule enforcement, see Guardrail rules and routing rules.
AttributeDescription
orq.fallback.indexAttempt number (0 = primary, 1 = first fallback, …)
orq.fallback.previous_modelModel that failed
orq.fallback.previous_errorError that triggered fallback
orq.auto_router.selected_modelModel chosen by auto-router
orq.auto_router.strong_modelHigh-capability candidate
orq.auto_router.economical_modelCost-efficient candidate
orq.auto_router.profileAuto-router profile
orq.load_balancer.selected_modelModel chosen by load balancer
orq.load_balancer.original_modelOriginally requested model
Use these to explain cost differences and latency spikes when routing changed the model.

Framework source

AttributeDescription
orq.trace.framework.nameFramework that emitted the trace, e.g. "langchain", "openai-agents", "llama-index"
Use this to distinguish traces emitted directly by the AI Gateway from those produced by an external framework.

Webhook example

A typical LLM webhook payload includes these attributes in the data.attributes block:
{
  "orq.organization_id": "3d4c4097-3ad7-48f8-965e-71d8d25ddb1b",
  "orq.workspace_id": "391ff8f8-95cd-49bd-9e28-eddba2d570b8",
  "orq.product": "router",
  "orq.span_type": "span.chat_completion",
  "orq.model.id": "85b18e5b-76a0-48dc-99b5-5738c35c9c85",
  "orq.model.provider": "openai",
  "orq.model.type": "chat",
  "orq.model.is_private": false,
  "orq.billing.input_cost": 0.0000012,
  "orq.billing.output_cost": 0.0000054,
  "orq.billing.total_cost": 0.0000066,
  "orq.billing.billable": false,
  "orq.billing.pricing_tier": "standard"
}
See Webhooks for the full envelope shape.