Distributed Tracing Broken After Upgrading Elastic .NET APM Agent & Elasticsearch - Razor Pages Not Linking

Hi all,

I'm facing a frustrating issue with distributed tracing after upgrading my Elastic APM components. Here's my situation:

  • Upgraded ASP.NET Core Agent: From 1.18.0 to 1.28.4
  • Upgraded Elasticsearch (Cloud): From 7.12.0 to 8.15.0
  • Configuration changes:
    • Replaced "SpanFramesMinDuration" with "SpanStackTraceMinDuration"
    • Moved APM setup from Configure to ConfigureServices

The problem:

  • Distributed tracing seems broken:
    • Old service map: Everything traced correctly, all microservices and external services linked.
    • Now:
      • API and MVC applications seem to trace fine or at least more tracing
      • Razor Pages applications:
        • Not tracing at all except for their connected databases
        • Can see dependencies in APM, but no linking
        • Sample traces not available for Razor Pages transactions

Additional info:

  • No other code changes, no middleware
  • Plenty of data flowing to Elasticsearch 8.15.0
  • I'm also sending log data VIA Serilog to this instance, but only the minimum required changes have been made there after nuget package upgrades.

Questions:

  • Has anyone else encountered similar issues after these upgrades?
  • Any specific configuration changes or compatibility issues I should be aware of?
  • Where should I start looking to troubleshoot this? Happy to provide any logs or data needed.

Thanks,

Here is something interesting, I started slowing downgrading the .net elastic apm agent one version at a time. I would clear all of my data in elastic between versions. When I got to elastic .net apm agent version 1.25.0., all of my traces and service maps work correctly without changing any configuration in my applications or in Elasticsearch.