共用方式為


az spring app-insights

備註

此參考是 Azure CLI 的 spring 延伸模組的一部分(2.56.0 版或更高版本)。 當您第一次執行 az spring app-insights 命令時,擴充功能會自動安裝。 深入瞭解擴充功能

此命令群組已隱含取代,因為命令群組 'spring' 已被取代,並將在未來版本中移除。

在 Azure Spring Apps 中管理 Application Insights 的命令。

命令

名稱 Description 類型 狀態
az spring app-insights show

顯示 Application Insights 設定。

擴充套件 Deprecated
az spring app-insights update

更新 Application Insights 設定。

擴充套件 Deprecated

az spring app-insights show

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

顯示 Application Insights 設定。

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

必要參數

--name -n

Azure Spring Apps 實例的名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app-insights update

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

更新 Application Insights 設定。

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

範例

使用連接字串 (建議) 或檢測金鑰來啟用 Application Insights。

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

停用 Application Insights。

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

必要參數

--name -n

Azure Spring Apps 實例的名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--app-insights

相同資源群組中現有Application Insights 的名稱。 或不同資源群組中現有ApplicationInsights的資源標識碼。

屬性
參數群組: Application Insights Arguments
--app-insights-key

現有 Application Insights 的連接字串(建議)或檢測密鑰。

屬性
參數群組: Application Insights Arguments
--disable

停用 Application Insights。

屬性
參數群組: Application Insights Arguments
接受的值: false, true
--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
--sampling-rate

Application Insights 的取樣率。 最大值為 100。

屬性
參數群組: Application Insights Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False