APM service dashboard throwing 500 errors when using APM dotnet agent 1.18 with Elastic 8.5
See original GitHub issueAPM Agent version
The version of the Elastic.Apm
nuget package used
1.18
Environment
Operating system and version: Loca development: macOS Ventura 13 Hosting: Azure App Service (Linux)
.NET Framework/Core name and version (e.g. .NET 4.6.1, NET Core 3.1.100) : .NET 6
Application Target Framework(s) (e.g. net461, netcoreapp3.1): net6.0
Describe the bug
A clear and concise description of what the bug is. When using a Linux azure app service, Elastic APM shows the following error when viewing APM service dashboard. This works fine when running on local macOS.
search_phase_execution_exception: [script_exception] Reason: runtime error (500)
Note that the same code also works with Elasticsearch 7.17 deployment. Seems the bug only affects version 8.4 and 8.5.
To Reproduce
Steps to reproduce the behavior:
- Create a new Elastic instance on Elastic cloud. Choose version 8.5 when asked.
- Create a .NET Web API project. I’m using the weather API sample that comes when creating a new project.
- Add Elastic APM 1.18 nuget package
- Add APM config to appsettings.json
"ElasticApm":
{
"Enabled": true,
"ServiceName": "TestAPM",
"SecretToken": "{Token-Here}",
"ServerUrls": "{APM-URL}",
"Environment": "TestAPM",
"TransactionSampleRate": 1.0,
"CaptureBody": "all",
"CloudProvider": "azure"
}
- Wire up Elastic APM
app.UseAllElasticApm(builder.Configuration);
- Create a new Azure App Service, make sure it is Linux
- Publish the solution to Azure
- Call the API a few times either from browser or Postman
- Open Kibana, go to Observability > APM
- Under APM, select services
- Click on the service name
- See the error popup on the service overview page
Expected behavior
A clear and concise description of what you expected to happen.
View the APM page without error
Actual behavior
This error is displayed: search_phase_execution_exception: [script_exception] Reason: runtime error (500)
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top GitHub Comments
@ldn7 We’ll pull in a bug fix for 8.8 and backport it to 8.7. Does that work for you?
Hi @code-junkie-403,
it looks like this problem can be resolved by upgrading to
8.5.1
. Let us know if that works for you.CC @kpatticha