apm-agent-dotnet: Agent does not work on new Asp.Net Core 3.1 Project
Describe the bug Agent does not work on new Asp.Net Core 3.1 Project. Browser loads the page forever.
To Reproduce Steps to reproduce the behavior:
- Create a new Asp.Net Core 3.1 MVC Project
- Run and see the homepage
- Stop debugging
- Add nuget package : Install-Package Elastic.Apm.AspNetCore -Version 1.5.1
- Add configuration to the appsettings.json file :
"ElasticApm": {
"SecretToken": "",
"ServerUrls": "http://localhost:8200", //Set custom APM Server URL (default: http://localhost:8200)
"ServiceName": "TestApp" //allowed characters: a-z, A-Z, 0-9, -, _, and space. Default is the entry assembly of the application
}
- Add directive to the startup.cs file:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseElasticApm(Configuration);
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
- Press run (debug) button
Expected behavior Page to be loaded.
But browser tries to load the page forever. No exception. No content.


About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (9 by maintainers)
@gregkalapos interesting, now it seems to be working. So it’s Metrics related.
I’ve already updated to 1.6.0, but the issue remains. I completely understand that ‘keeps loading’ isn’t very useful, but I’m not sure where to look tbh. I’ve only tested this with an existing application, I will try again later today with a new one.
In the meantime, here is some of the extra info you requested. Hope it helps.
appsettings.json:
Diagnostic Tools, after pressing Break All:
Breaks on:
Details Caller/Callee:
Details Call Tree:
Details Modules:
Details Functions:
Let me know if you need more.
Perfect, then that must be the key point 👍. I’ll follow up here.