Download PDF
Download page Automate .NET for Azure Functions Deployment.
Automate .NET for Azure Functions Deployment
This page describes how to scale instrumentation of Azure Functions with the .NET Agent.
Add the Splunk AppDynamics Azure Site Extension Using an ARM Template
You can deploy the Splunk AppDynamics Azure Site Extension to Azure App Services using an Azure Resource Manager (ARM) template. This procedure uses Visual Studio Community 2017.
To create and deploy an ARM template:
- From your web application in Visual Studio, choose File > New Project.
- Click Cloud, then click Azure Resource Group, then click OK.
- From the Select Azure Template dialog box, click Web App, then click OK.
- Under your newly-created Resource Group, click the Website.json file.
- Under JSON outline in the left pane, right-click resources, then choose Add New Resource.
- In the Add Resource dialog box, select Application Settings for Web Apps, enter a name, then click OK.
- Under the properties section, enter your Controller information. The following example shows the Website.json file with the application properties for Splunk AppDynamics.
- Add a new resource for the Site Extension, as shown in the following example:
{
"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'))]"
},
"resources": [
{
"apiVersion": "2016-08-01",
"name": "appsettings",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('webSiteName'))]"
],
"properties": {
"appdynamics.controller.hostName": "mycompany.saas.appdynamics.com",
"appdynamics.controller.port": "443",
"appdynamics.controller.ssl.enabled": "true",
"appdynamics.agent.accountName": "mycompany",
"appdynamics.agent.accountAccessKey": "[parameters('AppDAccessKeyInKeyVault')]",
"appdynamics.agent.applicationName": "HelloWorldSecureAppDKey",
"appdynamics.agent.tierName": "TestTier",
"appdynamics.agent.nodeName": "TestNode"
}
},
{
"apiVersion": "2015-08-01",
"name": "AppDynamics.WindowsAzure.SiteExtension.4.5.Release",
"type": "siteextensions",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('webSiteName'))]"
]
},
Configure the Agent Using Environment Variables
If you want to configure the .NET Agent using environment variables, add the environment variables before you install the Splunk AppDynamics Azure Site Extension.
Configuring the .NET Agent using environment variables allows for unattended configuration. To configure agents in this manner, add the environment variables before you install the Splunk AppDynamics Azure Site Extension, as follows:
- In the Azure Portal, open your Azure Function.
- Navigate to Function app settings > Manage application settings.
- Click +New Application Setting and enter your environment variables as name/value pairs.
The table below lists the available environment variables:
Environment Variable (Application Setting) | Description (Value) | Required |
---|---|---|
appdynamics.controller.hostName | Host associated with the Controller used by your Azure Function. Do not include Example: | Yes |
appdynamics.controller.port | Port associated with your Controller. If the port is left blank or is invalid, defaults to 443. Example: | No |
appdynamics.agent.accountName | Account name associated with the Controller used by your Azure Function. Example: | Yes |
appdynamics.agent.accountAccessKey | Access key for your Controller. See Agent-to-Controller Connections. | Yes |
appdynamics.agent.applicationName | Name of the Azure Function App. Example: | Yes |
appdynamics.controller.ssl.enabled | Sets SSL connection to the Controller. Valid values:
| No |
Microsoft Azure, the Azure logo, Azure, and any other Microsoft Marks used in these materials are trademarks of Microsoft.com, Inc. or its affiliates in the United States and/or other countries.