DEV Community

Douglas Lima
Douglas Lima

Posted on Edited on

Why I built a live request-flow visualizer for ASP.NET Core (and what v0.4.0 adds)

Every time a request misbehaves somewhere deep inside a layered ASP.NET Core API, I hit the same wall. I know something went wrong between the controller and the database, but I don't know where, not without attaching a debugger or stitching it together from logs after the fact.

That's the gap NetApiFlow is trying to close.

It's an open source NuGet package that shows, live, the exact path an HTTP request takes through your own code: Controller or Endpoint, then Handler, then Services, then Repositories, then SQL.

Duration per step, where a failure started, what got slow, what never ran at all.

The constraint that shaped everything

No external infrastructure. No second dashboard to deploy, no collector to babysit, no extra Docker container sitting around just for observability.

The dashboard itself is an Angular app embedded straight into the NuGet package, served by your own API process.

Install it, add two lines, open a URL:

builder.Services.AddNetApiFlow();
builder.Services.AddNetApiFlowDashboard();

// ...

app.UseNetApiFlowDashboard(); // mounted at /flow by default
Enter fullscreen mode Exit fullscreen mode

What it actually looks like

A request comes in and the graph lights up node by node as each step runs.

If something fails, you see exactly where, with the real exception attached.

If a step crosses your configured threshold, it's flagged slow.

And if a branch never executed, an early return, a condition that short-circuited, it shows up as "not executed" instead of just quietly not being there.

Every state is color plus icon plus text, on purpose.

Color alone breaks down for colorblind users and for anyone who ends up looking at a black-and-white printout, so it never has to carry meaning on its own here.

What's beyond the live graph

Every execution gets kept, in memory by default or in Postgres/SQL Server if you add one of the storage packages, and you can step through any past trace exactly as it happened, at whatever speed you want.

If the same SQL shape repeats K times inside a single request, the graph flags it as an N+1 without you having to count anything by hand.

Aggregate enough real executions of the same route and you get a static architecture map of what that endpoint typically does, something you can actually export as Mermaid or SVG instead of a diagram that goes stale the week after someone draws it.

The core listens to the same ActivitySource your HttpClient and Npgsql are already emitting, so OpenTelemetry interop comes for free without the core pulling in the OTel SDK at all.

An optional package exports the same trace via OTLP to Jaeger, Tempo, or Aspire Dashboard if that's where you already live.

And since the whole thing is just a REST API under the hood, there's an embedded MCP server too, so an AI agent debugging your service can pull a recent trace or per-component stats without anyone writing it a client by hand.

What v0.4.0 adds: authentication in the test panel

NetApiFlow has had a "Try an endpoint" panel for a while now.

It reads your own OpenAPI document and builds a real request form out of it, no Postman required.

The gap I kept running into testing it against an actual authenticated API: every protected route needed the Authorization header pasted back in by hand, every single request, every refresh of the page.

v0.4.0 closes that gap, the same way Swagger UI and Scalar already do it.

It reads components.securitySchemes straight from your OpenAPI document, metadata your API is probably emitting already without anyone thinking about it.

It shows an "Authorize" section, and once you paste a token in, it applies the right header or query parameter automatically to every request whose route needs it.

The value only lives in sessionStorage for that one tab, nothing touches disk, nothing leaves your own API.

Give it a try

Install the packages:

dotnet add package NetApiFlow
dotnet add package NetApiFlow.Dashboard
Enter fullscreen mode Exit fullscreen mode

Project links:

License: MIT.

The whole thing started from the idea behind apiflow for Spring Boot. No code borrowed, just the inspiration.

It's still early, and I'd rather hear what breaks or what's missing for your setup than nothing at all.

Top comments (0)