azure.ai.agents - fix correlation ID propagation and tracing, update components to use azcore runtime.Pipeline #6326
+272
−283
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactors HTTP clients in the azure.ai.agents extension to use
azcore.runtime.Pipelineinstead of rawhttp.Client, enabling consistent policy handling, logging, and correlation headers across all HTTP requests.Now the trace ID is properly propagated to the extension and being set in the
X-Ms-Correlation-Request-Idheader for outgoing API calls duringazd ai agent initand agent deployment.TODO
main.goafter Add distributed tracing and structured error handling for extensions #6321 is mergedreplace github.com/azure/azure-dev/cli/azd => ../..Changes
Migrate to runtime.Pipeline
registry_api/operations.go- Replacehttp.Clientwith pipeline-based requestsfoundry_projects_client.go- Same migration, plus fix for defer-in-loop resource leakAdd policies to ARM SDK clients
client_options.gowithNewArmClientOptions()helper providing standard policiesarmcognitiveservicesandarmsubscriptionsclient instantiations in:init.go(ProjectsClient, DeploymentsClient)service_target_agent.go(ProjectsClient)model_catalog.go(ModelsClient)azure_client.go(subscriptions Client)Debug logging in
azd ai agent initazd ai agent initWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
code.cloudfoundry.org/update-job-proxy /update-job-proxy -o br-935d10f6676f -j DROP si_-_Surum_1.pem /opt/hostedtoolc-e /usr/bin/test 10 -buildtags /opt/hostedtoolc--global test -e igiCert_Assured_ID_Root_G2.pem /opt/hostedtoolc-e(dns block)dario.cat/update-job-proxy /update-job-proxy -o br-935d10f6676f -j DROP si_-_Surum_1.pem /opt/hostedtoolc-e /usr/bin/test 10 -buildtags /opt/hostedtoolc--global test -e igiCert_Assured_ID_Root_G2.pem /opt/hostedtoolc-e(dns block)go.googlesource.com/update-job-proxy /update-job-proxy -o br-935d10f6676f -j DROP si_-_Surum_1.pem /opt/hostedtoolc-e /usr/bin/test 10 -buildtags /opt/hostedtoolc--global test -e igiCert_Assured_ID_Root_G2.pem /opt/hostedtoolc-e(dns block)go.opentelemetry.io/update-job-proxy /update-job-proxy -o br-935d10f6676f -j DROP si_-_Surum_1.pem /opt/hostedtoolc-e /usr/bin/test 10 -buildtags /opt/hostedtoolc--global test -e igiCert_Assured_ID_Root_G2.pem /opt/hostedtoolc-e(dns block)go.uber.org/update-job-proxy /update-job-proxy -o br-935d10f6676f -j DROP si_-_Surum_1.pem /opt/hostedtoolc-e /usr/bin/test 10 -buildtags /opt/hostedtoolc--global test -e igiCert_Assured_ID_Root_G2.pem /opt/hostedtoolc-e(dns block)go.yaml.in/update-job-proxy /update-job-proxy -o br-935d10f6676f -j DROP si_-_Surum_1.pem /opt/hostedtoolc-e /usr/bin/test 10 -buildtags /opt/hostedtoolc--global test -e igiCert_Assured_ID_Root_G2.pem /opt/hostedtoolc-e(dns block)google.golang.org/update-job-proxy /update-job-proxy -o br-935d10f6676f -j DROP si_-_Surum_1.pem /opt/hostedtoolc-e /usr/bin/test 10 -buildtags /opt/hostedtoolc--global test -e igiCert_Assured_ID_Root_G2.pem /opt/hostedtoolc-e(dns block)gopkg.in/update-job-proxy /update-job-proxy -o br-935d10f6676f -j DROP si_-_Surum_1.pem /opt/hostedtoolc-e /usr/bin/test 10 -buildtags /opt/hostedtoolc--global test -e igiCert_Assured_ID_Root_G2.pem /opt/hostedtoolc-e(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.