semconv.com

gen_ai.output.messages

MovedGenAI registryanyas of v1.44.0

Messages returned by the model where each message represents a specific model response (choice, candidate).

Instrumentations MUST follow Output messages JSON schema

Each message represents a single output choice/candidate generated by the model. Each message corresponds to exactly one generation (choice/candidate) and vice versa - one choice cannot be split across multiple messages or one message cannot contain parts from multiple choices.

When the attribute is recorded on events, it MUST be recorded in structured form. When recorded on spans, it MAY be recorded as a JSON string if structured format is not supported and SHOULD be recorded in structured form otherwise.

Instrumentations MAY provide a way for users to filter or truncate output messages.

> [!Warning] > This attribute is likely to contain sensitive information including user/PII data.

See Recording content on attributes section for more details.

Examples

Used by

events (1)

  • gen_ai.client.inference.operation.details (opt-in)

spans (8)

  • span.anthropic.inference.client (opt-in)
  • span.aws.bedrock.client (opt-in)
  • span.azure.ai.inference.client (opt-in)
  • span.gen_ai.inference.client (opt-in)
  • span.gen_ai.invoke_agent.client (opt-in)
  • span.gen_ai.invoke_agent.internal (opt-in)
  • span.gen_ai.invoke_workflow.internal (opt-in)
  • span.openai.inference.client (opt-in)

* required on that signal.

History

  1. v1.42.0deprecated

    Moved to the OpenTelemetry GenAI semantic conventions repository.

  2. v1.37.0

    Added as development.

Definition sourceRegistry docsJSON