HttpReports is an APM monitoring system based on .NET Core released under the MIT open-source license. Its main features include statistics, analysis, visualization, monitoring, and tracing, making it suitable for use in microservice environments.
Official site: https://www.yuque.com/httpreports/docs/uyaiil
Key Features
- API call metrics analysis
- Multi-service node data aggregation analysis
- Slow request and error request analysis
- API call log query
- Multi-type alert monitoring
- HTTP and gRPC call analysis
- Distributed tracing
- Multi-database support, easy to integrate
- Application performance monitoring
Step 1
Open Visual Studio and create a new .NET project. Here I’m using .NET Core Web API for demonstration.
Step 2
Use NuGet to install the MHttpReports.Dashboard package and HttpReports.SqlServer.

Step 3
Configure appsettings.json:
{
"HttpReportsDashboard": {
"ExpireDay": 3,
"Storage": {
"ConnectionString": "Server=10.1.30.252;Database=GEISDB;user id=sa;password=Mg2021;",
"DeferSecond": 10,
"DeferThreshold": 100
},
"Check": {
"Mode": "Self",
"Switch": true,
"Endpoint": "",
"Range": "500,2000"
},
"Mail": {
"Server": "smtp.163.com",
"Port": 465,
"Account": "HttpReports@qq.com",
"Password": "*******",
"EnableSsL": true,
"Switch": true
}
}
}
Parameter explanation:
ExpireDay– Data expiration days, default 3 days. HttpReports automatically clears expired data.Storage– Storage informationDeferSecond– Number of seconds for batch data insertion, recommended value 5-60.DeferThreshold– Number of items for batch data insertion, recommended value 100-1000.
Mail– Email information. When monitoring is configured, alert emails can be sent.Check– Health check configuration, see the Health Check page for details.
Step 4
Configure Startup:
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddHttpReportsDashboard().AddSQLServerStorage();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseHttpReportsDashboard();
}
Start the Dashboard application. If everything is fine, it will redirect to the Dashboard login page.

Default account: admin
Password: 123456
Now the Dashboard UI is available, but there is no data yet. We still need to add HttpReports to the server-side application to collect information.
Step 5
Create a new WebAPI project UserService to act as the user service. Then install HttpReports and HttpReports.Transport.Http.

Step 6
Modify the Appsettings.json of the service with a simple configuration:
{
"HttpReports": {
"Transport": {
"CollectorAddress": "http://localhost:5000/",
"DeferSecond": 10,
"DeferThreshold": 100
},
"Server": "http://localhost:7000",
"Service": "User",
"Switch": true,
"RequestFilter": ["/api/health/*", "/HttpReports*"],
"WithRequest": true,
"WithResponse": true,
"WithCookie": true,
"WithHeader": true
}
}
Parameter explanation:
Transport–CollectorAddress– The address to send data to; just set it to the Dashboard project address.DeferSecond– Number of seconds for batch data insertion, recommended 5-60.DeferThreshold– Number of items for batch data insertion, recommended 100-300.
Server– The address of the service.Service– The name of the service.Switch– Whether to enable data collection.RequestFilter– Data filtering, use*for fuzzy matching.WithRequest– Whether to record the input parameters of API calls.WithResponse– Whether to record the output parameters of API calls.WithCookie– Whether to record Cookie information.WithHeader– Whether to record request Header information.
Last Step
Next, modify the Startup.cs file of the UserService project.
The line app.UseHttpReports(); should preferably be placed at the very top of the Configure method.
public void ConfigureServices(IServiceCollection services)
{
services.AddHttpReports().AddHttpTransport();
services.AddControllers();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseHttpReports();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
Refresh the endpoints of the UserService, then go back to the Dashboard page. You should already see data.

Summary
This blog post describes how to use HttpReports for API statistics, analysis, visualization, monitoring, and tracing. If you find it helpful, please give a follow.