semconv.com

gen_ai.system_instructions

MovedGenAI registryanyas of v1.44.0

The system message or instructions provided to the GenAI model separately from the chat history.

This attribute SHOULD be used when the corresponding provider or API allows to provide system instructions or messages separately from the chat history.

Instructions that are part of the chat history SHOULD be recorded in gen_ai.input.messages attribute instead.

Instrumentations MUST follow System instructions JSON schema.

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 system instructions.

> [!Warning] > This attribute may contain sensitive information.

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