Share via


az spring app-insights

Note

This reference is part of the spring extension for the Azure CLI (version 2.56.0 or higher). The extension will automatically install the first time you run an az spring app-insights command. Learn more about extensions.

Commands to management Application Insights in Azure Spring Apps.

Commands

Name Description Type Status
az spring app-insights show

Show Application Insights settings.

Extension GA
az spring app-insights update

Update Application Insights settings.

Extension GA

az spring app-insights show

Show Application Insights settings.

az spring app-insights show --name
                            --resource-group

Required Parameters

--name -n

The name of Azure Spring Apps instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az spring app-insights update

Update Application Insights settings.

az spring app-insights update --name
                              --resource-group
                              [--app-insights]
                              [--app-insights-key]
                              [--disable {false, true}]
                              [--no-wait]
                              [--sampling-rate]

Examples

Enable Application Insights by using the Connection string (recommended) or Instrumentation key.

az spring app-insights update -n MyService -g MyResourceGroup --app-insights-key "MyConnectionString" --sampling-rate 100

Disable Application Insights.

az spring app-insights update -n MyService -g MyResourceGroup --disable

Required Parameters

--name -n

The name of Azure Spring Apps instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--app-insights

Name of the existing Application Insights in the same Resource Group. Or Resource ID of the existing Application Insights in a different Resource Group.

--app-insights-key

Connection string (recommended) or Instrumentation key of the existing Application Insights.

--disable

Disable Application Insights.

Accepted values: false, true
--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--sampling-rate

Sampling Rate of application insights. Maximum is 100.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.