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"

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

Templates

  1. {{db.query.summary}}
  2. {{db.operation.name}} {{db.collection.name}}
  3. {{db.operation.name}} {{db.stored_procedure.name}}
  4. {{db.operation.name}} {{db.namespace}}
  5. {{db.operation.name}} {{server.address}}:{{server.port}}
  6. {{db.collection.name}}
  7. {{db.stored_procedure.name}}
  8. {{db.namespace}}
  9. {{server.address}}:{{server.port}}
  10. {{db.system.name}}
  11. Database operation fallback

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.handoffgen_ai.invoke_agent

Templates

  1. {{gen_ai.operation.name}} {{gen_ai.agent.name}}
  2. {{gen_ai.operation.name}}
  3. Generative AI agent operation fallback

Examples

text_completion Zedtext_completion Claude Codeembeddings

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.execute_tool

Templates

  1. {{gen_ai.operation.name}} {{gen_ai.request.model}}
  2. {{gen_ai.operation.name}}
  3. Generative AI model operation fallback

Examples

text_completion gpt-4embeddings huggingfacechat claude-opus-4chat

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 Operation fallback

Examples

mutationquery

HTTP

Client

Operations that represent outgoing HTTP requests.

Affected ops

http.client

Templates

  1. {{http.request.method}} {{http.route}}
  2. {{http.request.method}} {{url.template}}
  3. {{http.request.method}}
  4. HTTP fallback

Examples

GET /users/:idGET

Server

Operations that represent processing incoming HTTP requests in a web server.

Affected ops

http.server

Templates

  1. {{http.request.method}} {{http.route}}
  2. {{http.request.method}} {{url.template}}
  3. {{http.request.method}}
  4. HTTP fallback

Examples

GET /users/:idGET

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

Templates

  1. {{messaging.operation.type}} {{messaging.destination.name}}
  2. {{messaging.operation.type}} {{server.address}}:{{server.port}}
  3. {{messaging.operation.type}}
  4. Messaging fallback

Examples

send user.datapublish