Currently, azsdk. NewMsCorrelationPolicy() is configured in the agent_api pipeline (cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_api/operations.go), but the X-Ms-Correlation-Request-Id header is not included in outgoing requests. This is likely because the tracing span/context information is not being propagated correctly from azd core to the extension, so the policy never sees a valid span ID.
Tasks:
- Investigate how context (and span/trace IDs) can be propagated across the CLI core and the extension boundary to ensure correlation ID header is set
- Ensure application of azsdk.NewMsCorrelationPolicy works as intended
- Document findings or required core/extension changes for other extension authors
See MsCorrelationPolicy source for reference.
Currently,
azsdk. NewMsCorrelationPolicy()is configured in the agent_api pipeline (cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_api/operations.go), but theX-Ms-Correlation-Request-Idheader is not included in outgoing requests. This is likely because the tracing span/context information is not being propagated correctly from azd core to the extension, so the policy never sees a valid span ID.Tasks:
See MsCorrelationPolicy source for reference.