Skip to content

Fix container app logging to app insights - #5719

Merged
Mikael Weaver (mikaelweave) merged 3 commits into
mainfrom
personal/mikaelw/fix-pr-ci-appinsights
Aug 12, 2026
Merged

Fix container app logging to app insights#5719
Mikael Weaver (mikaelweave) merged 3 commits into
mainfrom
personal/mikaelw/fix-pr-ci-appinsights

Conversation

@mikaelweave

@mikaelweave Mikael Weaver (mikaelweave) commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Enable Application Insights telemetry for PR and CI FHIR Server instances hosted in Azure Container Apps.
  • Use connection-string ingestion instead of the obsolete instrumentation-key path.

Changes

  • Create a workspace-backed Application Insights component for each freshly provisioned Container App.
  • Set Telemetry__Provider, Telemetry__ConnectionString, and APPLICATIONINSIGHTS_CONNECTION_STRING.
  • Remove the legacy Telemetry__InstrumentationKey variable during CI redeploys.
  • Retrieve the existing CI Application Insights connection string and suppress update output so it is not written to pipeline logs.

Validation

  • PR build 50814 deployed all five FHIR instances with matching connection strings and no instrumentation-key variable.
  • The shared workspace received 386,375 traces, 6,766 requests, 146,385 dependencies, and 830 exceptions during the run.
  • Traces were present for every Application Insights component.

Rollout and compatibility

  • Fresh PR environments receive monitoring resources during provisioning.
  • Existing CI environments require a one-time manual Application Insights setup before redeploy.
  • No FHIR runtime behavior or database schema changes.

Related issues

Addresses AB#204341

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 65 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
  • Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
  • Tag the PR with Schema Version backward compatible, Schema Version backward incompatible, or Schema Version unchanged if this adds or updates SQL scripts.
  • When changing system design or assumptions, create and include an ADR.
  • CI is green before merge
  • Review squash-merge requirements

Semver Change (docs)

Patch

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mikaelweave
Mikael Weaver (mikaelweave) requested a review from a team as a code owner August 11, 2026 20:57
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.72%. Comparing base (ccd2246) to head (e758802).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5719      +/-   ##
==========================================
- Coverage   77.74%   77.72%   -0.03%     
==========================================
  Files        1007     1011       +4     
  Lines       37173    37262      +89     
  Branches     5651     5680      +29     
==========================================
+ Hits        28902    28963      +61     
- Misses       6896     6924      +28     
  Partials     1375     1375              

see 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mikaelweave Mikael Weaver (mikaelweave) changed the title Harden Container App telemetry provisioning Fix container app logging to app insights Aug 12, 2026
@mikaelweave Mikael Weaver (mikaelweave) added Open source This change is only relevant to the OSS code or release. Bug Bug bug bug. No-PaaS-breaking-change Schema Version unchanged No-ADR ADR not needed labels Aug 12, 2026
@mikaelweave
Mikael Weaver (mikaelweave) merged commit 1c9df51 into main Aug 12, 2026
50 of 57 checks passed
@mikaelweave
Mikael Weaver (mikaelweave) deleted the personal/mikaelw/fix-pr-ci-appinsights branch August 12, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Bug bug bug. No-ADR ADR not needed No-PaaS-breaking-change Open source This change is only relevant to the OSS code or release. Schema Version unchanged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants