Skip to content

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

Open
@jamescrosswell

Description

@jamescrosswell

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions