semconv.com

gen_ai.input.messages

MovedGenAI registryanyas of v1.44.0

The chat history provided to the model as an input.

Instrumentations MUST follow Input messages JSON schema. 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.

Messages MUST be provided in the order they were sent to the model. Instrumentations MAY provide a way for users to filter or truncate input 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