Repository navigation
Conversation
Create App Insights with ingestion disabled, an Azure Monitor Private Link Scope, the azuremonitor private endpoint and DNS zones when a project uses BYO-egress network isolation. Add a preflight check for an existing azuremonitor private endpoint on the VNet. Managed egress stays unsupported. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c1d0003f-40c8-481d-92a5-ecb8d7afb491
Bug bash S2 and the Foundry team require a project-level Agents capability host for private tracing. Add it for BYO egress, regenerate main.arm.json, and add a regression test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c1d0003f-40c8-481d-92a5-ecb8d7afb491
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c1d0003f-40c8-481d-92a5-ecb8d7afb491
…oring Unsupported private-network monitoring cases now skip with a warning. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c1d0003f-40c8-481d-92a5-ecb8d7afb491
Live testing in a VNet showed PrivateOnly ingestion makes a scoped App Insights component reject private ingestion (403) and no Foundry traces arrive. Ingestion Open with query PrivateOnly delivered traces readable from inside the network. Component public ingestion and query stay disabled. Adds a regression test pinning the access modes in the Bicep and ARM templates and updates the README and private networking docs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c1d0003f-40c8-481d-92a5-ecb8d7afb491
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Private Azure Monitor path for network-secured Foundry projects
Stacked on Azure#10743 (
feat/foundry-agent-default-tracing); retarget tomainafter it merges.Problem
A project with a
network:block (VNet-injected agents) could not send traces: native azd monitoring created public-ingestion App Insights. Azure#10743 skips monitoring in that case. This PR adds a private path so agent traces arrive in App Insights and can be read from inside the network.What azd now provisions (new project,
network:with your own agent subnet, monitoring enabled)App Insights and Log Analytics are regional PaaS resources, not VNet members. They are reachable from the VNet only through the AMPLS private endpoint. Traces are readable only from a network that reaches the scope (jump host, VPN); a laptop on the public internet cannot query them.
AMPLS access modes (why ingestion is Open)
The AMPLS lists the scoped resources and has two access modes. The private endpoint and DNS send the VNet's Azure Monitor traffic to the scope; the mode decides what happens to traffic for resources that are not scoped. The path to a scoped resource is the same in both modes.
PrivateOnlyOpenLive testing found that
PrivateOnlyingestion makes a scoped component reject private ingestion and no traces arrive. This setting is also the default of the bug bashfoundry-private-setupskill. The component's own public ingestion stays Disabled, so ingestion still reaches it only through the private endpoint. Query staysPrivateOnly.Tradeoff: with ingestion Open, the VNet can also send telemetry to unscoped Azure Monitor components that accept public traffic. Why a scoped component rejects
PrivateOnlyingestion is not understood and is being raised with the Azure Monitor team.Test evidence (S2 environment from the Foundry VNet bug bash, westus3, one run each)
Jump VM inside the VNet, public access off on all resources, ApiKey connection unchanged. A control custom event is sent to the private ingestion endpoint, a prompt agent and a hosted agent are invoked, then Application Insights is queried privately for rows newer than the call.
responsesapi, hosted-agentdependencyandtrace)A separate private environment configured with an Open AMPLS and an Entra connection also delivered service-side traces. Auth mode (ApiKey vs Entra) was not the blocker.
Differences from the bug bash S2 (
foundry-private-setup) Monitor configurationThe Monitor setup matches S2 (workspace-based App Insights and workspace with public ingestion and query Disabled, both scoped to one AMPLS,
azuremonitorprivate endpoint, the same four DNS zones, ApiKey connection) except:PrivateOnly/PrivateOnly, which blocked trace ingestion in testing. This PR uses ingestionOpen, queryPrivateOnly.accounts/projects/connections).Resource names also differ (for example scoped resources
appinsights-scopedandworkspace-scoped) with no functional effect. The project-scoped connection was not live-tested; S2 traces worked with the account-scoped one.Behavior and limits
azuremonitorprivate endpoint do not block provisioning: monitoring is skipped with a warning (opt-out:monitoring.enabled: false).Changes
synthesis/templates/modules/monitor-private-link.bicep: AMPLS, scoped resources,azuremonitorprivate endpoint, four DNS zones (create-and-link or reuse existing),ingestionAccessMode: Open,queryAccessMode: PrivateOnly.main.arm.jsonandexisting-project.arm.json.TestMonitorPrivateLinkAccessModespins the access modes in the Bicep and both ARM templates.README.mdandazure.ai.agents/docs/private-networking.md.Not covered
One region and one run per configuration; Terraform parity and eject for this module follow the same shape but were not live-tested.