You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding 'Configure' Options to CLI for Azure Log Analytics (#2781)
## 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
- [X] 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
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: aaronburtle <[email protected]>
[Option("azure-key-vault.retry-policy.network-timeout-seconds",Required=false,HelpText="Configure the network timeout for requests in seconds. Default: 60.")]
[Option("runtime.telemetry.azure-log-analytics.log-type",Required=false,HelpText="Configure Log Type for Azure Log Analytics to find table to send telemetry data")]
191
+
publicstring?AzureLogAnalyticsLogType{get;}
192
+
193
+
[Option("runtime.telemetry.azure-log-analytics.flush-interval-seconds",Required=false,HelpText="Configure Flush Interval in seconds for Azure Log Analytics to specify the time interval to send the telemetry data")]
[Option("runtime.telemetry.azure-log-analytics.auth.workspace-id",Required=false,HelpText="Configure Workspace ID for Azure Log Analytics used to find workspace to connect")]
197
+
publicstring?AzureLogAnalyticsWorkspaceId{get;}
198
+
199
+
[Option("runtime.telemetry.azure-log-analytics.auth.dcr-immutable-id",Required=false,HelpText="Configure DCR Immutable ID for Azure Log Analytics to find the data collection rule that defines how data is collected")]
[Option("runtime.telemetry.azure-log-analytics.auth.dce-endpoint",Required=false,HelpText="Configure DCE Endpoint for Azure Log Analytics to find table to send telemetry data")]
runtimeConfig=runtimeConfig!with{Runtime=runtimeConfig.Runtime!with{Telemetry=runtimeConfig.Runtime!.Telemetryis not null?runtimeConfig.Runtime!.Telemetrywith{AzureLogAnalytics=updatedAzureLogAnalyticsOptions}:newTelemetryOptions(AzureLogAnalytics:updatedAzureLogAnalyticsOptions)}};
_logger.LogError("Failed to update configuration with runtime.telemetry.azure-log-analytics.flush-interval-seconds. Value must be a positive integer greater than 0.");
_logger.LogInformation($"Updated configuration with runtime.telemetry.azure-log-analytics.flush-interval-seconds as '{options.AzureLogAnalyticsFlushIntervalSeconds}'");
_logger.LogInformation($"Updated configuration with runtime.telemetry.azure-log-analytics.auth.workspace-id as '{options.AzureLogAnalyticsWorkspaceId}'");
_logger.LogInformation($"Updated configuration with runtime.telemetry.azure-log-analytics.auth.dcr-immutable-id as '{options.AzureLogAnalyticsDcrImmutableId}'");
_logger.LogInformation($"Updated configuration with runtime.telemetry.azure-log-analytics.auth.dce-endpoint as '{options.AzureLogAnalyticsDceEndpoint}'");
1185
+
}
1186
+
1187
+
// Update Azure Log Analytics options with Auth options if it was modified
0 commit comments