Skip to content

Every span and metric

What each instrumentation crate records, under which names, so you can find them in your backend, write dashboards and alerts against them, or check them against what another language records. Every name is defined by the OpenTelemetry semantic conventions; descriptions are theirs. Stable names don’t change. Names in development can change in a later release of the conventions, and oxtel follows them when they do.

Values that may hold personal or secret data, such as tool arguments, aren’t recorded unless asked for, and aren’t listed here.

HTTP servers and clients built on tower, axum and hyper. A server span is named by its method and route, such as GET /items/{id}; a client span by its method alone. The server also writes a request log line as each request ends.

AttributeWhat it isStability
error.typeDescribes a class of error the operation ended with.stable
http.request.methodHTTP request method.stable
http.response.status_codeHTTP response status code.stable
network.protocol.versionThe actual version of the protocol used for network communication.stable
server.addressServer domain name if available without reverse DNS lookup; otherwise, IP address or UNIX domain socket name.stable
server.portServer port number.stable
url.fullAbsolute URL describing a network resource according to RFC3986stable
AttributeWhat it isStability
error.typeDescribes a class of error the operation ended with.stable
http.request.methodHTTP request method.stable
http.response.status_codeHTTP response status code.stable
http.routeThe matched route template for the request. This MUST be low-cardinality and include all static path segments, with dynamic path segments represented with placeholders.stable
network.protocol.versionThe actual version of the protocol used for network communication.stable
server.addressServer domain name if available without reverse DNS lookup; otherwise, IP address or UNIX domain socket name.stable
server.portServer port number.stable
url.pathThe URI path componentstable
url.schemeThe URI scheme component identifying the used protocol.stable
user_agent.originalValue of the HTTP User-Agent header sent by the client.stable
MetricInstrumentWhat it measures, and its labelsStability
http.client.request.durationhistogram, in sDuration of HTTP client requests. Labels: error.type, http.request.method, http.response.status_code, server.address, server.port, url.scheme.stable
http.server.active_requestsup-down counter, in {request}Number of active HTTP server requests. Labels: http.request.method, url.scheme.in development
http.server.request.durationhistogram, in sDuration of HTTP server requests. Labels: error.type, http.request.method, http.response.status_code, http.route, network.protocol.version, url.scheme.stable

reqwest clients. A span is named by its method, as oxtel-tower’s client spans are, and records the same names.

AttributeWhat it isStability
error.typeDescribes a class of error the operation ended with.stable
http.request.methodHTTP request method.stable
http.response.status_codeHTTP response status code.stable
network.protocol.versionThe actual version of the protocol used for network communication.stable
server.addressServer domain name if available without reverse DNS lookup; otherwise, IP address or UNIX domain socket name.stable
server.portServer port number.stable
url.fullAbsolute URL describing a network resource according to RFC3986stable
MetricInstrumentWhat it measures, and its labelsStability
http.client.request.durationhistogram, in sDuration of HTTP client requests. Labels: error.type, http.request.method, http.response.status_code, server.address, server.port, url.scheme.stable

SQLite through rusqlite, PostgreSQL through tokio-postgres and deadpool-postgres, and sqlx’s pools. A span is named by its statement’s summary: its operation and table, such as SELECT orders. The connection pool metrics come from deadpool-postgres and sqlx pools.

AttributeWhat it isStability
db.namespaceThe name of the database, fully qualified within the server address and port.stable
db.query.summaryLow cardinality summary of a database query.stable
db.query.textThe database query being executed.stable
db.response.returned_rowsNumber of rows returned by the operation.in development
db.response.status_codeDatabase response status code.stable
db.system.nameThe database management system (DBMS) product as identified by the client instrumentation.stable
error.typeDescribes a class of error the operation ended with.stable
server.addressServer domain name if available without reverse DNS lookup; otherwise, IP address or UNIX domain socket name.stable
server.portServer port number.stable
MetricInstrumentWhat it measures, and its labelsStability
db.client.connection.countup-down counter, in {connection}The number of connections that are currently in state described by the state attribute. Labels: db.client.connection.pool.name, db.client.connection.state.in development
db.client.connection.maxup-down counter, in {connection}The maximum number of open connections allowed. Labels: db.client.connection.pool.name.in development
db.client.connection.pending_requestsup-down counter, in {request}The number of current pending requests for an open connection. Labels: db.client.connection.pool.name.in development
db.client.connection.timeoutscounter, in {timeout}The number of connection timeouts that have occurred trying to obtain a connection from the pool. Labels: db.client.connection.pool.name.in development
db.client.connection.use_timehistogram, in sThe time between borrowing a connection and returning it to the pool. Labels: db.client.connection.pool.name.in development
db.client.connection.wait_timehistogram, in sThe time it took to obtain an open connection from the pool. Labels: db.client.connection.pool.name.in development
db.client.operation.durationhistogram, in sDuration of database client operations. Labels: db.namespace, db.query.summary, db.response.status_code, db.system.name, error.type, server.address, server.port.stable

MCP servers and clients built with rmcp. A span is named by its method and, for a tool or prompt, its name, such as tools/call add.

AttributeWhat it isStability
error.typeDescribes a class of error the operation ended with.stable
gen_ai.operation.nameThe name of the operation being performed.in development
gen_ai.tool.nameName of the tool utilized by the agent.in development
mcp.method.nameThe name of the request or notification method.in development
mcp.protocol.versionThe version of the Model Context Protocol used.in development
rpc.response.status_codeStatus code of the RPC returned by the RPC server or generated by the clientin release_candidate
AttributeWhat it isStability
error.typeDescribes a class of error the operation ended with.stable
gen_ai.operation.nameThe name of the operation being performed.in development
gen_ai.tool.call.argumentsParameters passed to the tool call.in development
gen_ai.tool.call.resultThe result returned by the tool call (if any and if execution was successful).in development
gen_ai.tool.nameName of the tool utilized by the agent.in development
jsonrpc.request.idA string representation of the id property of the request and its corresponding response.in development
mcp.method.nameThe name of the request or notification method.in development
mcp.protocol.versionThe version of the Model Context Protocol used.in development
network.transportOSI transport layer or inter-process communication method .stable
rpc.response.status_codeStatus code of the RPC returned by the RPC server or generated by the clientin release_candidate
MetricInstrumentWhat it measures, and its labelsStability
mcp.client.operation.durationhistogram, in sThe duration of the MCP request or notification as observed on the sender from the time it was sent until the response or ack is received. Labels: error.type, gen_ai.operation.name, gen_ai.tool.name, mcp.method.name, mcp.protocol.version, rpc.response.status_code.in development
mcp.server.operation.durationhistogram, in sMCP request or notification duration as observed on the receiver from the time it was received until the result or ack is sent. Labels: error.type, gen_ai.operation.name, gen_ai.tool.name, mcp.method.name, mcp.protocol.version, network.transport, rpc.response.status_code.in development
mcp.server.session.durationhistogram, in sThe duration of the MCP session as observed on the MCP server. Labels: mcp.protocol.version, network.transport.in development

Calls to generative AI models. A span is named by its operation and the model asked for, such as chat llama3.2.

AttributeWhat it isStability
error.typeDescribes a class of error the operation ended with.stable
gen_ai.conversation.idThe unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation.in development
gen_ai.embeddings.dimension.countThe number of dimensions the resulting output embeddings should have.in development
gen_ai.operation.nameThe name of the operation being performed.in development
gen_ai.provider.nameThe Generative AI provider as identified by the client or server instrumentation.in development
gen_ai.request.choice.countThe target number of candidate completions to return.in development
gen_ai.request.frequency_penaltyThe frequency penalty setting for the GenAI request.in development
gen_ai.request.max_tokensThe maximum number of tokens the model generates for a request.in development
gen_ai.request.modelThe name of the GenAI model a request is being made to.in development
gen_ai.request.presence_penaltyThe presence penalty setting for the GenAI request.in development
gen_ai.request.seedRequests with same seed value more likely to return same result.in development
gen_ai.request.streamIndicates whether the GenAI request was made in streaming mode.in development
gen_ai.request.temperatureThe temperature setting for the GenAI request.in development
gen_ai.request.top_kThe top-K sampling setting for the GenAI request: restricts token generation at each step to the K most likely next tokens.in development
gen_ai.request.top_pThe top_p sampling setting for the GenAI request.in development
gen_ai.response.idThe unique identifier for the completion.in development
gen_ai.response.modelThe name of the model that generated the response.in development
gen_ai.response.time_to_first_chunkTime to first chunk in a streaming response, measured from request issuance, in seconds. The value is measured from when the client issues the generation request to when the first chunk is received in the response stream.in development
gen_ai.usage.input_tokensThe number of tokens used in the GenAI input (prompt).in development
gen_ai.usage.output_tokensThe number of tokens used in the GenAI response (completion).in development
server.addressServer domain name if available without reverse DNS lookup; otherwise, IP address or UNIX domain socket name.stable
server.portServer port number.stable
MetricInstrumentWhat it measures, and its labelsStability
gen_ai.client.inference.durationhistogram, in sGenAI client inference operation duration. Labels: error.type, gen_ai.operation.name, gen_ai.provider.name, gen_ai.request.model, gen_ai.response.model, server.address, server.port.in development
gen_ai.client.inference.operation.input_tokenshistogram, in {token}The number of input (prompt) tokens used per inference operation. Labels: error.type, gen_ai.operation.name, gen_ai.provider.name, gen_ai.request.model, gen_ai.response.model, server.address, server.port.in development
gen_ai.client.inference.operation.output_tokenshistogram, in {token}The number of output (completion) tokens used per inference operation. Labels: error.type, gen_ai.operation.name, gen_ai.provider.name, gen_ai.request.model, gen_ai.response.model, server.address, server.port.in development
gen_ai.client.inference.time_per_output_chunkhistogram, in sTime per output chunk, recorded for each chunk received after the first one, measured as the time elapsed from the end of the previous chunk to the end of the current chunk. Labels: gen_ai.operation.name, gen_ai.provider.name, gen_ai.request.model, server.address, server.port.in development
gen_ai.client.inference.time_to_first_chunkhistogram, in sTime to receive the first chunk, measured from when the client issues the generation request to when the first chunk is received in the response stream. Labels: gen_ai.operation.name, gen_ai.provider.name, gen_ai.request.model, server.address, server.port.in development
gen_ai.client.inference.usage.input_tokenscounter, in {token}The number of input (prompt) tokens used, including cached tokens. Labels: gen_ai.operation.name, gen_ai.provider.name, gen_ai.request.model, gen_ai.response.model, gen_ai.token.modality, server.address, server.port.in development
gen_ai.client.inference.usage.output_tokenscounter, in {token}The number of output (completion) tokens used, including reasoning tokens. Labels: gen_ai.operation.name, gen_ai.provider.name, gen_ai.request.model, gen_ai.response.model, gen_ai.token.modality, server.address, server.port.in development
gen_ai.client.operation.durationhistogram, in sGenAI operation duration. Labels: gen_ai.operation.name, gen_ai.provider.name, gen_ai.request.model.in development

Each crate’s tests run its instrumentation, check that every name it records is one the conventions define, with the conventions’ instrument and unit, and keep the names in a file that the test fails on when they change. This page is generated from those files, and CI checks that it’s up to date, so it can’t list a name the code doesn’t record, or miss one it does.

oxtel-tokio’s metrics aren’t in the conventions, which define none for tokio; its documentation lists them.