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:

  1. Create a new Asp.Net Core 3.1 MVC Project
  2. Run and see the homepage
  3. Stop debugging
  4. Add nuget package : Install-Package Elastic.Apm.AspNetCore -Version 1.5.1
  5. 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
  }
  1. 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();
            }
  1. Press run (debug) button

Expected behavior Page to be loaded.

But browser tries to load the page forever. No exception. No content.

output.txt

2020-06-23 19_55_17-about_blank

2020-06-23 19_58_52-Discover - Elastic

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

@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: image

Diagnostic Tools, after pressing Break All: image

Breaks on: image

Details Caller/Callee: image

Details Call Tree: image

Details Modules: image

Details Functions: image

Let me know if you need more.

Running self hosted has fixed the issue. In our scenario since we use Windows Authentication we have to use IIS unfortunately.

Perfect, then that must be the key point 👍. I’ll follow up here.