Requests
- ASP.NET Core hosting
- Routing and handler time
- Headers, user, tags
- Response bodies (opt-in)
Two lines in Program.cs. Then every request shows its routing, handler, EF Core and ADO.NET queries, HttpClient and gRPC calls, messages, logs, and exceptions, on one timeline at /_wizelens.
builder.Services.AddWizeLens(); builder.Services.AddDbContext<ShopDb>(o => o.UseNpgsql(cs).UseWizeLens()); builder.Services.AddHttpClient<OrdersClient>(); builder.Host.UseSerilog((ctx, log) => log.WriteTo.WizeLens()); var app = builder.Build(); app.UseWizeLens();
Everything below lands in the same trace as the request that caused it.
Open the hood on one request and see what it really did. WizeLens brings that back for ASP.NET Core, and follows the request into every service after it.
Traces live in a small SQLite file next to your app, so a restart does not wipe them. If the file cannot be written, WizeLens keeps working in memory.
Dapper or a provider WizeLens does not know? Wrap the connection and every command is captured.
new ProfiledDbConnection(new SqliteConnection(cs))WizeLens is on in Development only. Turn it on anywhere else yourself, with Enabled = true.
A React front end, a .NET gateway, and a Node service follow the same rules and join the same trace.