Install the agent (.NET 7.0 and above)
Add NuGet Atatus package in your application.
copy# Package Manager Install-Package Atatus.NetCoreAll -Version 2.0.1 (or) # .NET CLI dotnet add package Atatus.NetCoreAll --version 2.0.1
Add below initialization code into your
Program.cs
file.For ASP.NET Core, once you reference the Atatus.NetCoreAll package, please call
UseAllAtatus()
extension method to enable auto instrumentation.Make sure to have the line
app.UseAllAtatus(...)
as the first line in the Configure method. If not, the correct timings of your request would not be captured.copyusing Atatus.NetCoreAll; var app = builder.Build(); // import your appsettings configuration. IConfiguration configuration = new ConfigurationBuilder() .AddJsonFile("appsettings.json") .Build(); app.UseAllAtatus(configuration);
Add your Atatus configuration in your
appsettings.json
file.copy"Atatus": { "AppName": "YOUR_APP_NAME", "LicenseKey": "YOUR_LICENSE_KEY" }
Restart your .NET server.
Just restart your server and access it from your web app or curl. You will visualize your application's metrics within minutes.
Install the agent (Below .NET 7.0)
Add NuGet Atatus package in your application.
copy# Package Manager Install-Package Atatus.NetCoreAll -Version 2.0.1 (or) # .NET CLI dotnet add package Atatus.NetCoreAll --version 2.0.1
Add below initialization code into your
Startup.cs
file.For ASP.NET Core, once you reference the Atatus.NetCoreAll package, please call
UseAllAtatus()
extension method to enable auto instrumentation.Make sure to have the line
app.UseAllAtatus(...)
as the first line in the Configure method. If not, the correct timings of your request would not be captured.copyusing Atatus.NetCoreAll; public class Startup { public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app.UseAllAtatus(Configuration); // Your code here } // Your code here }
Add your Atatus configuration in your
appsettings.json
file.copy"Atatus": { "AppName": "YOUR_APP_NAME", "LicenseKey": "YOUR_LICENSE_KEY" }
Restart your .NET server.
Just restart your server and access it from your web app or curl. You will visualize your application's metrics within minutes.