Skip to content
agentgateway has joined the Agentic AI FoundationLearn more

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Span attribute reference

Page as Markdown

Reference for the default HTTP, conditional, generative AI, and MCP span attributes emitted by agentgateway, including policy call child spans.

The following default attributes are included in each span. Note that protocol-specific attributes, such as gen_ai.* and mcp.*, only appear when that type of traffic is processed. You can add custom attributes to your spans or remove default ones.

Core HTTP attributes

AttributeDescription
gatewayGateway name
listenerListener name
routeRoute name
endpointBackend endpoint address
protocolBackend protocol (for example, llm, mcp, http)
http.methodHTTP request method
http.hostRequest host
http.pathRequest path
http.statusResponse status code
http.versionHTTP version
src.addrClient source address
trace.idTrace ID of the outgoing span
span.idSpan ID of the outgoing span
durationRequest duration

Conditional attributes

These attributes are only present when the relevant feature or traffic type is active.

AttributeWhen presentDescription
grpc.statusgRPC trafficgRPC status code from the response
tls.sniTLS connections without an HTTP Host headerTLS SNI value from the connection
src.identitymTLS trafficClient certificate identity
jwt.subJWT authenticationThe sub claim from the JWT token
route_ruleRoute has a named ruleRule name within the matched route
errorProxy errorsProxy error message
reasonNon-upstream proxy responsesResponse reason (for example, rate-limited or auth-rejected)
retry.attemptWhen a retry occurredRetry attempt number

Generative AI attributes (LLM)

These attributes follow the OTel semantic conventions for generative AI spans.

AttributeDescription
gen_ai.operation.nameOperation type (for example, chat)
gen_ai.provider.nameLLM provider (for example, openai)
gen_ai.request.modelRequested model
gen_ai.response.modelModel that served the response
gen_ai.usage.input_tokensInput token count
gen_ai.usage.output_tokensOutput token count

For the full list of LLM-specific attributes, see Observe LLM traffic.

MCP attributes

AttributeDescription
mcp.method.nameMCP method (for example, tools/call)
mcp.session.idMCP session identifier

For the full list of MCP-specific attributes, see Observe MCP traffic.

Policy call child spans

When agentgateway makes outbound calls to policy services, such as external authorization (ext_authz), rate limiting, guardrails, or OAuth token exchange, each call appears as a child span that is nested under the parent request span.

Each policy child span includes the following attributes:

AttributeDescription
agentgateway.outbound.kindAlways Policy for policy call spans.
agentgateway.outbound.subtypePolicy type: ext_authz, ext_proc, guardrail, rate_limit, or oidc.
http.methodHTTP method of the outbound call. Always POST for gRPC policy calls.
http.hostHostname of the policy service.
http.pathgRPC method path for the policy call.
http.statusHTTP response status code. Set on success.
error.typeError type string. Set on failure, along with the span error status.

Note

The filter, attributes, and remove settings behave differently for policy child spans than for the parent request span:

  • filter: Applies to the entire trace. If the filter drops the parent span, all policy child spans are dropped with it. You cannot selectively filter individual policy spans.
  • attributes: Added only to the parent request span. Policy child spans have a fixed attribute set and are not affected by your attributes config.
  • remove: Removes attributes only from the parent request span. The fixed attributes on policy child spans cannot be removed.
Was this page helpful?
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.