Skip to content
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

trace-propagation docs for ASP.NET are misleading #3888

Open
jamescrosswell opened this issue Jan 14, 2025 · 0 comments
Open

trace-propagation docs for ASP.NET are misleading #3888

jamescrosswell opened this issue Jan 14, 2025 · 0 comments

Comments

@jamescrosswell
Copy link
Collaborator

Looking at the Trace Propagation documentation page:

https://docs.sentry.io/platforms/dotnet/guides/aspnet/tracing/trace-propagation/

It says to use Context.StartOrContinueTrace(); for ASP.NET. But this causes transactions to stop working.

Do you know if I need to choose one or the other?

Hi @edgariscoding ,

I looks like the docs are a bit misleading. Basically you'd use StartOrContinueTrace method to ensure headers get propagated from upstream applications through to any downstream components in an application that was not instrumented for tracing. So if you had a front end, your ASP.NET Web API server and then a database, the front end could start traces, the database could add spans to those traces, but your Web API app wouldn't add any spans of it's own.

If also want transactions/spans to be created by your Web API server though, you need to call StartSentryTransaction... When you do that, your Web API will create transactions/spans that will show in the full distributed trace.

I'll create another ticket to get the docs you referenced updated - thanks for pointing that out!

Originally posted by @jamescrosswell in #3836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant