ASP.NET Core

To start tracing in ASP.NET Core application, a few simple actions should be taken:

  • Add Epsagon.Dotnet.Mvc package to your project.
  • Add a call to EpsagonBootstrap.Bootstrap() in the constructor of your startup class. for example:
public Startup(IConfiguration configuration)
{
    EpsagonBootstrap.Bootstrap();
    Configuration = configuration;
}
  • Add EpsagonMiddleware to your ASP.NET Core web project. for example:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    app.UseEpsagon();
    // other middlewares
}
  • Set the following environment variables:
    • EPSAGON_TOKEN - Epsagon's token, can be found in the Dashboard.
    • EPSAGON_APP_NAME - Name for the application of this function (optional).

Did this page help you?