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
Span type
Classifies the kind of work a span represents. Useorq.span_type to filter spans by operation type in the Traces panel or LLM webhook payloads.
Common values:
Model
Related standard fields:
gen_ai.request.model: model requested by the callergen_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.Token counts live under
gen_ai.usage.*, not orq.*.Tenant scope
Scope a trace to the organization, workspace, and product surface.
Filter traces by project, or assign cost to an Identity.
Invoked resources
Links a trace to the Orq.ai resources that served the request.
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
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
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.
Use these to debug why a request was blocked or routed by a rule.
Guardrails
On Guardrail spans:
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.
Use these to explain cost differences and latency spikes when routing changed the model.
Framework source
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 thedata.attributes block: