Thundra APM
Search…
Deployment Integrations
.NET Core 2.1

Step 1: Add Thundra NuGet package

1
dotnet add package Thundra.Agent --version 2.0.3
Copied!

Step 2: Add Thundra .NET Middleware

After installing the Thundra package, you will need to add Thundra .NET Middleware to your application. Thundra will monitor your application automatically.
Startup.cs
1
// ...
2
3
// Make sure to load the Thundra Package
4
using Thundra.Agent.Wrapper.ASP;
5
6
namespace SampleApplication
7
{
8
public class Startup
9
{
10
// ...
11
12
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
13
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
14
{
15
// ...
16
17
// Thundra .NET Middleware
18
app.UseThundra();
19
app.UseMvc(routes =>
20
{
21
// ...
22
});
23
}
24
}
25
}
26
Copied!

Step 3: Add necessary Environment Variables

Initially, we recommend setting two environment variables.
Set the thundra_apiKey environment variable to the API key value you got from the Thundra console and the thundra_agent_application_name to your choice of a name that will show up on the Thundra console.
Below, you'll see some examples of ways to set these variables.
Shell
1
export thundra_apiKey=<Thundra-ApiKey>
2
export thundra_agent_application_name=<Your-Application-Name>
Copied!
Dockerfile
1
ENV thundra_apiKey=<Thundra-ApiKey>
2
ENV thundra_agent_application_name=<Your-Application-Name>
Copied!
launchSettings.json
1
{
2
// ...
3
"profiles": {
4
"SampleApplication": {
5
// ...
6
"environmentVariables": {
7
// ...
8
"thundra_apiKey": "<Thundra-ApiKey>",
9
"thundra_agent_application_name": "<Your-Application-Name>"
10
}
11
}
12
}
13
}
14
15
Copied!
Last modified 2mo ago