DTOSS-12832: Enable Application Insights telemetry for gateway services - #105
Merged
josielsouzanordcloud merged 1 commit intoMay 12, 2026
Merged
Conversation
josielsouzanordcloud
temporarily deployed
to
review
May 7, 2026 08:30 — with
GitHub Actions
Inactive
josielsouzanordcloud
temporarily deployed
to
review
May 7, 2026 08:32 — with
GitHub Actions
Inactive
josielsouzanordcloud
had a problem deploying
to
review
May 7, 2026 09:07 — with
GitHub Actions
Failure
josielsouzanordcloud
had a problem deploying
to
review
May 7, 2026 09:19 — with
GitHub Actions
Failure
josielsouzanordcloud
temporarily deployed
to
review
May 7, 2026 09:34 — with
GitHub Actions
Inactive
josielsouzanordcloud
temporarily deployed
to
review
May 7, 2026 09:37 — with
GitHub Actions
Inactive
josielsouzanordcloud
force-pushed
the
DTOSS-12832-enable-application-insights-telemetry
branch
from
May 11, 2026 14:01
8f8edd5 to
868482a
Compare
josielsouzanordcloud
temporarily deployed
to
review
May 11, 2026 14:04 — with
GitHub Actions
Inactive
josielsouzanordcloud
temporarily deployed
to
review
May 11, 2026 14:07 — with
GitHub Actions
Inactive
josielsouzanordcloud
temporarily deployed
to
review
May 11, 2026 15:09 — with
GitHub Actions
Inactive
josielsouzanordcloud
temporarily deployed
to
review
May 11, 2026 15:11 — with
GitHub Actions
Inactive
…ation - Add app-insights module (workspace-linked to Arc LAW) to arc-infra - Surface connection string as a Terraform output - Fetch connection string at deploy time via az CLI and inject into .env - Derive CLOUD_API_ENDPOINT from per-environment CLOUD_API_HOSTNAME - Grant each Arc machine's system-assigned MI the Azure Relay Listener role on its own HC, removing the need for SAS keys - Add azureRelayListener to rbacAdmin condition allowlist in core.bicep - Remove AZURE_RELAY_KEY_NAME, AZURE_RELAY_SHARED_ACCESS_KEY, CLOUD_API_TOKEN from .env (superseded by managed identity)
josielsouzanordcloud
force-pushed
the
DTOSS-12832-enable-application-insights-telemetry
branch
from
May 12, 2026 08:20
868482a to
c9c00d7
Compare
josielsouzanordcloud
temporarily deployed
to
review
May 12, 2026 08:21 — with
GitHub Actions
Inactive
josielsouzanordcloud
temporarily deployed
to
review
May 12, 2026 08:23 — with
GitHub Actions
Inactive
steventux
approved these changes
May 12, 2026
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.
What
Enables application-level observability for the four gateway Python services (PACS, MWL, Upload, Relay Listener). The codebase already has
src/telemetry.pywired up for Azure Monitor / OpenTelemetry — this PR provides the infrastructure and deployment plumbing to activate it.Changes
Terraform
ai-mbsgw-<env>-arc-uks) toarc-infrausing the shareddtos-devops-templates/infrastructure/modules/app-insightsmodule, workspace-linked to the existing Arc Log Analytics Workspaceapp_insights_connection_stringas a sensitive output through thearc-inframodule and root moduleDeploy pipeline
deploy_arc_ring.shfetches the connection string at deploy time viaaz monitor app-insights component show(same ARM credentials already in scope) and injects it into the.envpayload sent to each VMAPPLICATIONINSIGHTS_CONNECTION_STRINGadded to the.envblock;AZURE_RELAY_KEY_NAME,AZURE_RELAY_SHARED_ACCESS_KEY, andCLOUD_API_TOKENremoved — all superseded by Managed Identity authenticationCLOUD_API_ENDPOINTandCLOUD_API_TOKENremoved; relay SAS key fetch removedCLOUD_API_ENDPOINTis now derived from a per-environmentCLOUD_API_HOSTNAMEvariable (see below) — no Key Vault or pipeline variable neededdeploy_stage.shno longer derives or passesKV_NAMEPer-environment config
CLOUD_API_HOSTNAMEadded to eachinfrastructure/environments/*/variables.sh, following the same pattern asdns_zone_nameindtos-manage-breast-screening:review.manage-breast-screening.non-live.screening.nhs.ukdev.manage-breast-screening.non-live.screening.nhs.ukpreprod.manage-breast-screening.nhs.ukmanage-breast-screening.nhs.ukAcceptance criteria
arc-inframodule, workspace-linked to the existing LAWdeploy_arc_ring.shinjectsAPPLICATIONINSIGHTS_CONNECTION_STRINGinto the.envpayloadCLOUD_API_ENDPOINTsourced from per-environment config (no Key Vault lookup)CLOUD_API_TOKEN,AZURE_RELAY_KEY_NAME,AZURE_RELAY_SHARED_ACCESS_KEYremoved from the deployment.env