Quick Start
Install from NuGet, initialize on startup, and optionally create scopes for background work.
Install
Install the NuGet package:
dotnet add package EFCoreProfiler
Initialize on startup
After installing the package, initialize it during app startup
Use only in the development environment.
if (env == Environments.Development)
{
EFCoreProfiler.Initialize("YourApiName");
}
HTTP requests are detected automatically.
Manual scopes
For BackgroundService, message consumers, scheduled jobs, or any work outside the HTTP request pipeline, create a manual scope:
using (EFCoreProfiler.CreateScope("YourBackgroundJobName"))
{
// Database operations
}