Skip to content

Commit 385b6c7

Browse files
committed
Updated as per PR comment
1 parent c0b3666 commit 385b6c7

File tree

3 files changed

+21
-311
lines changed

3 files changed

+21
-311
lines changed

EventHubs/src/azuredeploy_metrics.json

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
"defaultValue": "Enter HTTP Source URL",
5151
"type": "String"
5252
},
53+
"appInsightsName": {
54+
"defaultValue": "[concat('SumoMetricsAppInsights', uniqueString(resourceGroup().id))]",
55+
"type": "String"
56+
},
5357
"location": {
5458
"type": "string",
5559
"defaultValue": "[resourceGroup().location]",
@@ -189,11 +193,13 @@
189193
"minTlsVersion": "1.2",
190194
"scmMinTlsVersion": "1.2",
191195
"appSettings": [
192-
{ "name": "FUNCTION_APP_EDIT_MODE", "value": "readwrite" },
193196
{ "name": "FUNCTIONS_EXTENSION_VERSION", "value": "~1" },
194197
{ "name": "Project", "value": "EventHubs/target/metrics_build/" },
195198
{ "name": "AzureWebJobsStorage", "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storageAccounts_sumometapplogs_name'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_sumometapplogs_name')),'2022-09-01').keys[0].value)]" },
196-
{ "name": "AzureWebJobsDashboard", "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storageAccounts_sumometapplogs_name'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_sumometapplogs_name')),'2022-09-01').keys[0].value)]" },
199+
{ "name": "APPINSIGHTS_INSTRUMENTATIONKEY", "value": "[reference(resourceId('microsoft.insights/components/', parameters('appInsightsName')), '2020-02-02').InstrumentationKey]" },
200+
{ "name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING", "value" : "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storageAccounts_sumometapplogs_name'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_sumometapplogs_name')),'2022-09-01').keys[0].value)]"},
201+
{ "name": "WEBSITE_CONTENTSHARE", "value": "[toLower(parameters('sites_SumoMetricsFunctionApp_name'))]" },
202+
{ "name": "FUNCTION_APP_EDIT_MODE", "value": "readwrite"},
197203
{ "name": "SumoLabsMetricEndpoint", "value": "[parameters('SumoEndpointURL')]" },
198204
{ "name": "AzureEventHubConnectionString", "value": "[concat(listkeys(resourceId('Microsoft.EventHub/namespaces/authorizationRules', parameters('namespaces_SumoMetNamespace_name'),parameters('AuthorizationRules_RootManageSharedAccessKey_name')), '2022-10-01-preview').primaryConnectionString,';EntityPath=',parameters('eventhubs_insights_metrics_pt1m_name'))]" },
199205
{ "name": "StorageConnectionString", "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storageAccounts_sumometricsfailedmsg'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_sumometricsfailedmsg')),'2022-09-01').keys[0].value,';EndpointSuffix=', parameters('storageEndpointSuffix'))]" }
@@ -218,7 +224,8 @@
218224
"dependsOn": [
219225
"[resourceId('Microsoft.Web/serverfarms', parameters('serverfarms_SumoMetricsAppServicePlan_name'))]",
220226
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_sumometapplogs_name'))]",
221-
"[resourceId('Microsoft.EventHub/namespaces/', parameters('namespaces_SumoMetNamespace_name'))]"
227+
"[resourceId('Microsoft.EventHub/namespaces/', parameters('namespaces_SumoMetNamespace_name'))]",
228+
"[resourceId('Microsoft.Insights/components', parameters('appInsightsName'))]"
222229
]
223230
},
224231
{
@@ -264,6 +271,17 @@
264271
"[resourceId('Microsoft.EventHub/namespaces', parameters('namespaces_SumoMetNamespace_name'))]",
265272
"[resourceId('Microsoft.EventHub/namespaces/eventhubs', parameters('namespaces_SumoMetNamespace_name'), parameters('eventhubs_insights_metrics_pt1m_name'))]"
266273
]
274+
},
275+
{
276+
"name": "[parameters('appInsightsName')]",
277+
"type": "Microsoft.Insights/components",
278+
"apiVersion": "2020-02-02",
279+
"location": "[parameters('location')]",
280+
"kind": "web",
281+
"properties": {
282+
"Application_Type": "web",
283+
"applicationId": "[parameters('appInsightsName')]"
284+
}
267285
}
268286
]
269287
}

EventHubs/src/azuredeploy_metrics_with_appinsights.json

Lines changed: 0 additions & 287 deletions
This file was deleted.

EventHubs/tests/azure_metrics.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)