question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

APM service dashboard throwing 500 errors when using APM dotnet agent 1.18 with Elastic 8.5

See original GitHub issue

APM 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:

  1. Create a new Elastic instance on Elastic cloud. Choose version 8.5 when asked.
  2. Create a .NET Web API project. I’m using the weather API sample that comes when creating a new project.
  3. Add Elastic APM 1.18 nuget package
  4. 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"
  }
  1. Wire up Elastic APM
app.UseAllElasticApm(builder.Configuration);
  1. Create a new Azure App Service, make sure it is Linux
  2. Publish the solution to Azure
  3. Call the API a few times either from browser or Postman
  4. Open Kibana, go to Observability > APM
  5. Under APM, select services
  6. Click on the service name
  7. 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:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
kpattichacommented, Apr 13, 2023

@ldn7 We’ll pull in a bug fix for 8.8 and backport it to 8.7. Does that work for you?

1reaction
z1c0commented, Nov 21, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | APM .NET Agent Reference [1.x]
No data is sent to the APM Serveredit. If neither errors nor performance metrics are being sent to the APM Server, it's a...
Read more >
Common problems | APM User Guide [8.9]
If no data shows up in Elasticsearch, first make sure that your APM components are properly connected. Fleet-managed. APM Server binary. Is Elastic...
Read more >
Apm service-map Internal Server Error (500)
This service has data. When I click "Service Map", a 500 error appears, I don't know what data is missing.
Read more >
APM UI Kibana Internal Server Error
Kibana APM UI throws "Error: Request Timeout after 30000ms" for "1 day" worth data but the "Discovery" section of the Kibana can load...
Read more >
Untitled
I have pain in my lower left back, Parents throwing out gaming, Artificial shelter agriculture definition, Cyrine abdel nour law bass fe eanaia...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found