-
Notifications
You must be signed in to change notification settings - Fork 288
Adding 'Configure' Options to CLI for Azure Log Analytics #2781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding 'Configure' Options to CLI for Azure Log Analytics #2781
Conversation
Co-authored-by: RubenCerna2079 <[email protected]>
…erProvided flags Co-authored-by: aaronburtle <[email protected]>
…ided flags Co-authored-by: aaronburtle <[email protected]>
Aniruddh25
left a comment
There was a problem hiding this 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
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
souvikghosh04
left a comment
There was a problem hiding this 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.
|
/azp run |
There was a problem hiding this 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 successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Aniruddh25
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Why make this change?
This change closes issue #2777
What is this change?
This change extends the functionality of the
configureCLI 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?
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