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

**URL:** <https://discuss.elastic.co/t/distributed-tracing-broken-after-upgrading-elastic-net-apm-agent-elasticsearch-razor-pages-not-linking/365703>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [August 28, 2024, 2:54pm UTC](https://discuss.elastic.co/t/distributed-tracing-broken-after-upgrading-elastic-net-apm-agent-elasticsearch-razor-pages-not-linking/365703 "2024-08-28T14:54:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Nicolay](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@Andrew\_Nicolay](https://discuss.elastic.co/u/Andrew_Nicolay)\
**Post date:** [August 28, 2024, 2:54pm UTC](https://discuss.elastic.co/t/distributed-tracing-broken-after-upgrading-elastic-net-apm-agent-elasticsearch-razor-pages-not-linking/365703/1 "2024-08-28T14:54:00Z")

</div>

Hi all,

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

- **Upgraded [ASP.NET](http://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,

 ![before and after service maps](https://us1.discourse-cdn.com/elastic/original/3X/0/7/07e2c05d1f3565083c709eb90bad390822e0c427.jpeg)

---

<div class="post-metadata">

**Author:** ![Andrew\_Nicolay](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@Andrew\_Nicolay](https://discuss.elastic.co/u/Andrew_Nicolay)\
**Post date:** [August 28, 2024, 7:45pm UTC](https://discuss.elastic.co/t/distributed-tracing-broken-after-upgrading-elastic-net-apm-agent-elasticsearch-razor-pages-not-linking/365703/2 "2024-08-28T19:45:57Z")

</div>

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.
