-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Broken Distributed Tracing in ASP.NET Core 3.1 Razor Pages with Elastic APM Agent ≥ 1.26.0 #2432
Comments
Thanks for raising this, @Accudraft. This is surprising and certainly something we need to investigate. I can't see any changes in the diff that would immediately explain it. I'll attempt to reproduce locally and identify why this isn't working as expected. Can you gather trace level logs from two instrumented services that form a distributed trace? If so, could you email us at [email protected]? I can then provide a secure link to send the log files. Our logging should reveal why the distributed tracing may not work. |
I've successfully reproduced it and now have the logs I need to proceed. I have a theory that this could be due to the inclusion of |
Great, I'm glad you were able to reproduce it. I wouldn't have been able to get you the required logs until next week otherwise. Thanks for looking into this. |
After digging a bit deeper, I see that this is likely due to the cookie handling changes we made in 1.26.0. Although strictly speaking, the agent is now doing the "right" thing per our apm specification. The issue in my repro is due to dropped transactions when cookies are prefixed with a period character, which fails to be indexed by the server. I'm discussing this with the server team to see what we can/should do about this. @Accudraft, would you be able to check if you use any cookies with a period character at the start, which may confirm my current theory? |
Yes, all of my cookies start with ".AspNetCore" Session, Identity, Antiforgery, etc... Edit: I should note, these are the only cookies my applications use, and I believe they are just the default cookies created by the Microsoft.AspNetCore.Authentication.OpenIdConnect package we use. |
Thanks, @Accudraft. Yeah, those are some of the built-in cookies. Technically, it's possible to configure them with different names, but ultimately, any cookie starting with a |
Fixed by #2444 |
Environment:
Bug Description:
Distributed tracing is not functioning as expected in ASP.NET Core 3.1 Razor Pages projects when using the Elastic APM Agent version 1.28.4. While MVC and API projects seem unaffected, Razor Pages projects fail to generate end-to-end traces for requests involving other microservices or external services, even when those services utilize the same APM agent and server. Another issue I found to only affect Razor pages is the Transaction Name. The route could be something like /customer/details/abc-123, but the transaction name only comes through as /details. Again, this doesn’t seem to affect MVC or API projects.
Steps to Reproduce:
Expected Behavior:
Actual Behavior:
Additional Information:
The text was updated successfully, but these errors were encountered: