Bug Description
When running the basic responses sample from foundry-samples, the generated traces contain the system instructions duplicated in two span attributes:
gen_ai.system_instructions (correct)
gen_ai.input_messages (unexpected — system instructions should not appear here alongside user messages)
Steps to Reproduce
- Run the basic hosted-agent sample: https://github.com/microsoft-foundry/foundry-samples/blob/main/samples/python/hosted-agents/agent-framework/responses/01-basic/
- Observe the generated OTel traces (e.g. in Application Insights or a local exporter)
- Notice that the system instructions text appears in both
gen_ai.system_instructions and gen_ai.input_messages attributes on the same span
Expected Behavior
System instructions should only appear in gen_ai.system_instructions. The gen_ai.input_messages attribute should only contain user/assistant messages (the conversation history), not the system prompt.
Actual Behavior
System instructions are duplicated — present in both gen_ai.system_instructions and gen_ai.input_messages.
Environment
- Python agent-framework (latest)
- OpenTelemetry tracing enabled
- Observed via Application Insights
Bug Description
When running the basic responses sample from foundry-samples, the generated traces contain the system instructions duplicated in two span attributes:
gen_ai.system_instructions(correct)gen_ai.input_messages(unexpected — system instructions should not appear here alongside user messages)Steps to Reproduce
gen_ai.system_instructionsandgen_ai.input_messagesattributes on the same spanExpected Behavior
System instructions should only appear in
gen_ai.system_instructions. Thegen_ai.input_messagesattribute should only contain user/assistant messages (the conversation history), not the system prompt.Actual Behavior
System instructions are duplicated — present in both
gen_ai.system_instructionsandgen_ai.input_messages.Environment