2017-07-07 8 views
3

私のチームは、ARMテンプレートを使用してWeb AppのApplication Insightsライブプロファイラを有効にする必要があります。 Application Insightsのこのパフォーマンス機能は、次のリンクhttps://docs.microsoft.com/en-us/azure/application-insights/app-insights-profilerで説明されています。しかし、ARMテンプレートを使用して機能を追加する方法に関するドキュメントは見つかりません。私は以下のドキュメント(https://github.com/CawaMS/EnableProfilerForCompute/blob/master/How%20to%20enable%20Application%20Insights%20Profiler%20on%20Azure%20Compute%20resources.md)をガイドとして使用しようとしましたが、Appサービスとは対照的に、VMとAzure Computeリソースのプロファイリングを有効にするように調整されています。ARMテンプレートを使用してアプリケーションの洞察を含むライブAzure Webアプリケーションのプロファイリングを有効にする方法

+0

あなたはこの答えを見ていたことがありますか? https://stackoverflow.com/questions/37570408/azure-resource-template-dependencies-application-insights – Ian

+0

更新があれば、私の答えが役に立ったと感じたら、それを答えとしてマークしてください。それ。 –

+0

答えは、ARMテンプレートを使用してApplication Insightを有効にする方法を説明していますが、私の質問は、オリジナルの質問に含まれているリンクで説明されているApplication Inisights Live Profilerを有効にすることです(https://docs.microsoft.com/en- us/azure/application-insights/app-insights-profiler)を参照してください。ライブプロファイラは、Application Inisightsの最近リリースされた機能です。 – knorman

答えて

0

あなたの説明によれば、Webアプリケーションを展開してアプリケーションInsightsを有効にする場合は、以下のようにアームテンプレート(Microsoft.Insights /コンポーネントリソースをテンプレートに追加)を試すことができます。

Template.json

{ 
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 
    "contentVersion": "1.0.0.0", 
    "parameters": { 
    "hostingPlanName": { 
     "type": "string", 
     "minLength": 1 
    }, 
    "skuName": { 
     "type": "string", 
     "defaultValue": "F1", 
     "allowedValues": [ 
     "F1", 
     "D1", 
     "B1", 
     "B2", 
     "B3", 
     "S1", 
     "S2", 
     "S3", 
     "P1", 
     "P2", 
     "P3", 
     "P4" 
     ], 
     "metadata": { 
     "description": "Describes plan's pricing tier and capacity. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/" 
     } 
    }, 
    "skuCapacity": { 
     "type": "int", 
     "defaultValue": 1, 
     "minValue": 1, 
     "metadata": { 
     "description": "Describes plan's instance count" 
     } 
    } 
    }, 
    "variables": { 
    "webSiteName": "[concat('webSite', uniqueString(resourceGroup().id))]" 
    }, 
    "resources": [ 
    { 
     "apiVersion": "2015-08-01", 
     "name": "[parameters('hostingPlanName')]", 
     "type": "Microsoft.Web/serverfarms", 
     "location": "[resourceGroup().location]", 
     "tags": { 
     "displayName": "HostingPlan" 
     }, 
     "sku": { 
     "name": "[parameters('skuName')]", 
     "capacity": "[parameters('skuCapacity')]" 
     }, 
     "properties": { 
     "name": "[parameters('hostingPlanName')]" 
     } 
    }, 
    { 
     "apiVersion": "2015-08-01", 
     "name": "[variables('webSiteName')]", 
     "type": "Microsoft.Web/sites", 
     "location": "[resourceGroup().location]", 
     "tags": { 
     "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource", 
     "displayName": "Website" 
     }, 
     "dependsOn": [ 
     "[resourceId('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" 
     ], 
     "properties": { 
     "name": "[variables('webSiteName')]", 
     "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]" 
     } 
    }, 
    { 
     "apiVersion": "2014-04-01", 
     "name": "[variables('webSiteName')]", 
     "type": "Microsoft.Insights/components", 
     "location": "East US", 
     "dependsOn": [ 
     "[resourceId('Microsoft.Web/sites/', variables('webSiteName'))]" 
     ], 
     "tags": { 
     "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', variables('webSiteName'))]": "Resource", 
     "displayName": "AppInsightsComponent" 
     }, 
     "properties": { 
     "applicationId": "[variables('webSiteName')]" 
     } 
    } 
    ] 
} 

出力:

enter image description here

結果(ウェブアプリはすでにappInsightsと関係している)

enter image description here

0

私ができましたマイクロ私に次のような応答を送信する電子メールを介したソフト代表:

Hi, 

We are investigating how to automatically enable the Profiler after 
it’s installed with the AI site extension on an App Services resource; 
Currently there is no workaround for that yet ... 

Thanks 
-cath