Transactions Not Properly Labeled Since .NET 10 Upgrade

Kibana version: 8.18.2

Elasticsearch version: 8.18.2

APM Server version: 8.18.2

APM Agent language and version: Elastic.Apm.NetCoreAll 1.34.1 running on .NET 10

Browser version: n/a

Original install method (e.g. download page, yum, deb, from source, etc.) and version:

docker

Fresh install or upgraded from other version?

upgrade

Is there anything special in your setup? We have an ALB in front of our APM servers for load balancing. Our site also has an ALB in front for handling SSL, traffic is routed to ECS tasks one for dotnet which handles our APIs and another for node which handles our Nuxt based frontend.

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):

Since upgrading to .NET 10 transactions are not being properly logged. The only items showing in Transactions in Kibana are Experimental.System.Net.Http.Connections.ConnectionSetup, WaitForConnection or DnsLookup. If you dig in to these transactions you will mostly see the agent itself sending to the APM server.

Steps to reproduce:

  1. Attempt to instrument a .NET 10 app

Errors in browser console (if relevant): n/a

Provide logs and/or server output (if relevant): I tried enabling detail error logging but nothing was output to the console, I tried both setting ELASTIC_APM_LOG_LEVEL=Trace and ensuring that Serilog min level override for the Elastic.Apm namespace was set to Verbose.

I’m not sure how it was related to the .NET 10 upgrade, but I finally tracked down the issue. We have some custom span code so that we can get detailed Redis query information in APM.

This code would attempt to call StartSpan on the current transaction, but apparently during application startup, if the APM agent was not yet configured and a call to StartSpan was made, we would get the issue I described above. This is despite the fact that setting up the agent is the first thing in our application startup.

I adjusted our method that calls StartSpan to check Elastic.Apm.Agent.IsConfigured and return if is not yet configured and this has resolved the issue.