Skip to content

feat: Support BYO Log Analytics workspace for Foundry app and PostgreSQL diagnostics#154

Merged
Roopan-Microsoft merged 12 commits into
microsoft:devfrom
Saswato-Microsoft:psl-loganalytics-fix
May 15, 2026
Merged

feat: Support BYO Log Analytics workspace for Foundry app and PostgreSQL diagnostics#154
Roopan-Microsoft merged 12 commits into
microsoft:devfrom
Saswato-Microsoft:psl-loganalytics-fix

Conversation

@Saswato-Microsoft
Copy link
Copy Markdown
Contributor

Purpose

This pull request introduces support for "Bring Your Own" (BYO) Log Analytics Workspace, allowing users to route observability data from the deployed Foundry application and wrapper-managed PostgreSQL Flexible Server to an existing Log Analytics workspace. It also ensures the Application Insights component is created and linked appropriately, and updates documentation and parameters to guide users through this new capability.

The most important changes are:

Infrastructure & Parameterization:

  • Added a new parameter existingLogAnalyticsWorkspaceResourceId to infra/main.bicep, infra/main.bicepparam, and infra/main.json, enabling users to specify an existing Log Analytics workspace for telemetry and diagnostics. [1] [2] [3]
  • Updated the Bicep and ARM templates to conditionally create an Application Insights component linked to the specified workspace and to route PostgreSQL Flexible Server diagnostics to it when BYO is enabled. [1] [2] [3] [4] [5]

Outputs & Observability:

  • Added outputs for the BYO Log Analytics workspace and Application Insights component, including connection string and instrumentation key, to support downstream automation and configuration. [1] [2]

Documentation Updates:

  • Updated README.md and docs/deploymentguide.md to document the new BYO Log Analytics Workspace feature, required CLI versions, and usage instructions. [1] [2] [3] [4] [5]
  • Added detailed guidance on how to set up and use an existing Log Analytics workspace, including permissions and output references. [1] [2]

Version Requirements:

  • Updated required CLI versions in documentation to reflect the need for Bicep CLI 0.33.0+ to support the new infrastructure templates. [1] [2] [3]

These changes make it possible to centralize observability in existing Azure environments and improve flexibility for enterprise deployments.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

Roopan-Microsoft and others added 12 commits April 29, 2026 11:07
Adds Bicep CLI (v0.33.0+) to the local deployment prerequisites so users provisioning this accelerator locally have the required Bicep version installed before running 'azd up' / 'az deployment'.

Work item: AB#42634
docs: Add Bicep CLI (v0.33.0+) to local deployment prerequisites
…urceId

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…tion Insights integration

Co-authored-by: Copilot <copilot@github.com>
…greSQL diagnostics

Co-authored-by: Copilot <copilot@github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds “Bring Your Own” (BYO) Log Analytics Workspace support so deployments can route PostgreSQL diagnostics to an existing workspace and (optionally) create a workspace-based Application Insights component linked to it, plus exposes related outputs and updates docs.

Changes:

  • Added existingLogAnalyticsWorkspaceResourceId parameter to the Bicep/ARM templates and bicepparam wiring via EXISTING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID.
  • Conditionally creates an Application Insights component linked to the supplied workspace and configures PostgreSQL Flexible Server diagnostic settings to send logs/metrics to that workspace.
  • Added deployment outputs for the BYO workspace/App Insights details and updated README/deployment docs to describe the feature and required tooling.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Documents Bicep CLI requirement.
infra/main.bicep Implements BYO LAW logic, conditional App Insights creation, PostgreSQL diagnostic settings, and outputs.
infra/main.bicepparam Adds BYO workspace parameter wired from an azd environment variable.
infra/main.json Generated ARM template updates reflecting new parameter/resources/outputs.
docs/parameter_guide.md Adds BYO observability section with setup, outputs, and permissions guidance.
docs/deploymentguide.md Updates prerequisites and adds BYO LAW guidance to deployment documentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/parameter_guide.md
Comment thread docs/deploymentguide.md
Comment thread infra/main.bicep
@Roopan-Microsoft Roopan-Microsoft merged commit 155628a into microsoft:dev May 15, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants