Skip to content

Conversation

@RubenCerna2079
Copy link
Contributor

@RubenCerna2079 RubenCerna2079 commented Jul 22, 2025

Why make this change?

This change closes issue #2777

What is this change?

This change extends the functionality of the configure CLI command by introducing support for Azure Log Analytics properties. With this enhancement, users can now configure the Azure Log Analytics properties inside of their config file without the need to directly edit it.
This change also ensures that the validation of Azure Log Analytics works as intended.

How was this tested?

  • Integration Tests
  • Unit Tests

Sample Request(s)

CLI Updates
Add support to dab configure:

dab configure --runtime.telemetry.azure-log-analytics.enabled
dab configure --runtime.telemetry.azure-log-analytics.auth.workspace-id
dab configure --runtime.telemetry.azure-log-analytics.auth.dcr-immutable-id
dab configure --runtime.telemetry.azure-log-analytics.auth.dce-endpoint
dab configure --runtime.telemetry.azure-log-analytics.log-type
dab configure --runtime.telemetry.azure-log-analytics.flush-interval-seconds

Copy link
Collaborator

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

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

Confirm nullability of azureLogAnalyticsOptions

@github-project-automation github-project-automation bot moved this from Todo to Review In Progress in Data API builder Jul 22, 2025
@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079 RubenCerna2079 enabled auto-merge (squash) July 23, 2025 18:41
@RubenCerna2079 RubenCerna2079 disabled auto-merge July 25, 2025 19:55
Copy link
Contributor

@souvikghosh04 souvikghosh04 left a comment

Choose a reason for hiding this comment

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

LGTM. Approved with minor suggestions.

Copilot AI review requested due to automatic review settings July 30, 2025 17:12
@RubenCerna2079
Copy link
Contributor Author

/azp run

@RubenCerna2079 RubenCerna2079 enabled auto-merge (squash) July 30, 2025 17:13
Copy link
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

This PR adds support for configuring Azure Log Analytics properties through the CLI's configure command, allowing users to set telemetry options without manually editing config files. The change includes validation improvements and ensures proper serialization of Azure Log Analytics configuration.

  • Adds six new CLI options for Azure Log Analytics configuration (enabled, log-type, flush-interval-seconds, workspace-id, dcr-immutable-id, dce-endpoint)
  • Implements validation logic to ensure Azure Log Analytics is properly configured with required auth options
  • Updates JSON serialization to only include auth properties when user-provided values exist

Reviewed Changes

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

Show a summary per file
File Description
ConfigureOptions.cs Adds new CLI option properties for Azure Log Analytics configuration
ConfigGenerator.cs Implements configuration update logic and validation for Azure Log Analytics options
AzureLogAnalyticsOptionsConverterFactory.cs Updates serialization logic to conditionally include auth properties
AzureLogAnalyticsAuthOptionsConverter.cs Removes extraneous whitespace
ConfigureOptionsTests.cs Adds unit test for Azure Log Analytics configuration functionality
ValidateConfigTests.cs Adds validation test to ensure Azure Log Analytics fails without required auth options

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

Copy link
Collaborator

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

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

LGTM

@RubenCerna2079 RubenCerna2079 merged commit 7b6259b into main Jul 30, 2025
11 checks passed
@RubenCerna2079 RubenCerna2079 deleted the dev/rubencerna/add-configure-cli-log-analytics branch July 30, 2025 19:59
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in Data API builder Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add 'configure' CLI Options for Azure Log Analytics

4 participants