Span Name Documentation

This page contains documentation for known span names. You can use this documentation to understand how to create the name attribute for a span, when you have the span's other attributes.

Generating Names

Span names are generated via string template. Each span category of work has a set of templates for the span name. Curly brackets in the template indicate that the contents inside the curly brackets should be replaced with the contents of the span attribute of the name within the brackets.

The templates should be evaluated in order of appearance. The final template should be a static string, to be used as a fallback when none of the attribute-based templates can be satisfied.

Example

Given templates:

  1. {{http.request.method}} {{http.route}}
  2. {{http.request.method}}
  3. HTTP

And attributes http.request.method = "GET", http.route = "/users/:id":

Result: "GET /users/:id"

Browser

Pageload

A full page load of a web application.

Names for this category are not specified in OpenTelemetry Semantic Conventions.

Affected ops

pageload

Templates

  1. {{url.template}}
  2. Pageloadfallback

Examples

/users/:id/homePageload

Navigation

Client-side browser history change in a web application.

Names for this category are not specified in OpenTelemetry Semantic Conventions.

Affected ops

navigationnavigation.redirect

Templates

  1. {{url.template}}
  2. Navigationfallback

Examples

/users/:id/homeNavigation

Database

Queries

Operations that act on the data in a database. Includes operations like fetching, updating, and deleting records. Does not include operations like connecting to the database server.

Affected ops

dbdb.querydb.sql.querydb.sql.prismadb.sql.active_recorddb.sql.executedb.sql.roomdb.sql.transactiondb.redisredis

Examples

SELECT usersfindAndModify productsuserspostgres

Generative AI

Agent

Generative AI agent operations (e.g., spawning a new agent, an agent performing an action on behalf of a user, and agent handing off work to another agent).

Our definition differs from OpenTelemetry. The "gen_ai.handoff" operation is not present in OpenTelemetry.

Affected ops

gen_ai.create_agentgen_ai.handoffgen_ai.invoke_agent

Examples

text_completion Zedtext_completion Claude Codeinvoke_agent format_promptinvoke_agent weather_agentembeddings

Inference

Generative AI inference operations. Requests to a generative AI model to perform some unit of work (e.g., autocomplete, translation, chat completion, response to a query).

Affected ops

gen_aigen_ai.chatgen_ai.embeddingsgen_ai.execute_toolgen_ai.generate_contentgen_ai.rerankgen_ai.responsesgen_ai.text_completion

Examples

text_completion gpt-4embeddings huggingfacechat claude-opus-4execute_tool get_weatherchat

GraphQL

GraphQL

Any and all operations that fall under GraphQL

Our definition differs from OpenTelemetry. Unlike OTel, we prefix GraphQL operations with the word "GraphQL" (e.g., "GraphQL mutation" vs. "mutation".

Affected ops

http.graphqlhttp.graphql.queryhttp.graphql.mutationhttp.graphql.subscriptiongraphql.executegraphql.parsegraphql.resolvegraphql.requestgraphql.querygraphql.mutationgraphql.subscriptiongraphql.validate

Templates

  1. GraphQL {{graphql.operation.type}}
  2. GraphQL {{graphql.processing.type}}
  3. GraphQL Operationfallback

Examples

GraphQL queryGraphQL mutationGraphQL subscriptionGraphQL parseGraphQL resolveGraphQL Operation

HTTP

Messaging

Messaging

Operations that represent working with messages on topics in streaming data systems and queues (e.g., producing and consuming messages in Kafka, RabbitMQ).

Affected ops

topictopic.sendtopic.receivetopic.processqueuequeue.taskqueue.task.celeryqueue.task.rqqueue.task.delayed_jobqueue.task.active_jobqueue.submitqueue.submit.celeryqueue.resquequeue.sidekiq

Examples

send user.datapublish

Model Context Protocol (MCP)

Server

MCP server-side operations. Processing of incoming MCP requests or notifications initiated by a client, such as tool calls, prompt requests, and resource reads.

Our definition differs from OpenTelemetry. OpenTelemetry uses gen_ai.tool.name and gen_ai.prompt.name for the target in the span name.

Affected ops

mcp.server

Examples

tools/call get-weatherprompts/get analyze-coderesources/readinitialize

Notification

MCP notifications. One-way messages exchanged between an MCP client and server that do not expect a response.

Our definition differs from OpenTelemetry. OpenTelemetry does not model notifications as distinct operations; they are covered by the MCP Client and Server spans.

Affected ops

mcp.notification.client_to_servermcp.notification.server_to_client

Templates

  1. {{mcp.method.name}}
  2. MCP notificationfallback

Examples

notifications/initializednotifications/cancellednotifications/progress

Resource

Resources

Loading of resources in the browser.

Names for this category are not specified in OpenTelemetry Semantic Conventions.

Affected ops

resourceresource.scriptresource.cssresource.linkresource.imgresource.audioresource.videoresource.iframeresource.other

Templates

  1. {{url.domain}}
  2. Resourcefallback

Examples

example.com

Routing

Router

Operations that match and dispatch requests or navigations through an application router.

Names for this category are not specified in OpenTelemetry Semantic Conventions.

Affected ops

router

Examples

UserProfile/users/:id/users/{id}Router

Web server

Request handler

Handling of an incoming request by a web server route handler.

Names for this category are not specified in OpenTelemetry Semantic Conventions.

Affected ops

handler

Templates

  1. {{http.route}}
  2. Request handlerfallback

Examples

/users/:idRequest handler