Install .NET Core agent in AWS Beanstalk environment
Track the performance of your .NET Core web app's key metrics, like response time, throughput, and Apdex score, via the APM Insight .NET Core agent hosted in AWS Elastic Beanstalk via extensions.
Prerequisites
- AWS Toolkit for Visual Studio
- AWS developer access keys
Steps
- Open the project in Visual Studio, and add a folder named .ebextensions (if not present already).
- Under the .ebextensions folder, add a file named apminsightExtn.config.
- Paste the following content into the file, and update your license key in the parameter -LicenseKey under the command install_agent.
sources: "C:\\ProgramData\\apminsight-dotnetcoreagent": https://staticdownloads.site24x7.com/apminsight/agents/apminsight-dotnetcoreagent.zip commands: install_agent: command: powershell.exe "Start-Process powershell -ArgumentList '-ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command C:\ProgramData\apminsight-dotnetcoreagent\dotnet_core\InstallAgent.ps1 -Destination C:\ProgramData\Site24x7 -InstallType local -LicenseKey YOUR_LICENSE_KEY_HERE -AppName YOUR_APP_NAME' -Verb RunAs"
- Publish the web app using the Publish to AWS Elastic Beanstalk option, and follow the wizard.
- Once the deployment is successful, generate some traffic to view data in the Site24x7 console.
Deployment via uploading packages to AWS S3 Steps
- In the web application to be published, add a folder named .ebextensions (if not present already).
- Under the .ebextensions folder, add a file named apminsightExtn.config.
- Paste the following content into the file, and update your license key in the parameter -LicenseKeyunder the command install_agent.
sources: "C:\\ProgramData\\apminsight-dotnetcoreagent": https://staticdownloads.site24x7.com/apminsight/agents/apminsight-dotnetcoreagent.zip commands: install_agent: command: powershell.exe "Start-Process powershell -ArgumentList '-ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command C:\ProgramData\apminsight-dotnetcoreagent\dotnet_core\InstallAgent.ps1 -Destination C:\ProgramData\Site24x7 -InstallType local -LicenseKey YOUR_LICENSE_KEY_HERE -AppName YOUR_APP_NAME' -Verb RunAs"
- Include this .ebextensions folder when creating an application ZIP for publishing.
- If this is the first time you're publishing this app:
- Create an application in Elastic Beanstalk.
- Create an environment with the platform type set to IIS.
- Configure the required settings for the application, and select Upload your code under the Application code section.
- Select the ZIP file that contains the .ebextensions folder.
- Launch the environment after providing the required parameters.
- If publishing in an existing environment:
- Select the Elastic Beanstalk application and the environment for deployment.
- Click Upload and deploy.
- In the prompt to upload, select the ZIP file that contains the .ebextensions folder.
- Label the deployment and click Upload.
- Once the deployment is successful, generate some traffic to view the application in the Site24x7 console.