getsentry / sentry-docs

Sentry's documentation (and tools to build it)
https://docs.sentry.io
Other
331 stars 1.45k forks source link

ASP.NET Core docs for performance don't mention requests are measured #8532

Open bruno-garcia opened 11 months ago

bruno-garcia commented 11 months ago

https://docs.sentry.io/platforms/dotnet/guides/aspnetcore/performance/

Missing the UseSentryTracing instructions.

This way users will not get any transactions. Must have regressed at some point

new project wizard in-product has the instructions: image

With Sentry SDK for .NET version 4.0.0 we'll drop .NET 5 (6 will be the lowest) so worth updating that comment

kanadaj commented 11 months ago

Correction: UseSentryTracing

jamescrosswell commented 11 months ago

@bruno-garcia not regressed... updated to reflect this change in 3.40.0:

bruno-garcia commented 11 months ago

Context about this change and side effects on Discord: https://discord.com/channels/621778831602221064/1175852280625500281/1175901670702600323

@jamescrosswell there's no reference of this at all on the docs: https://docs.sentry.io/platforms/dotnet/guides/aspnetcore/performance/

We could expand on this, for users coming back after using the middleware and new users, that wonder what setting the sample rate does

bruno-garcia commented 11 months ago

Verify in the docs tells ppl to go to the Custom Transaction:

Verify Test out tracingThe process of logging the events that took place during a request, often across multiple services. by starting and finishing a transaction, which you must do so transactions can be sent to Sentry. Learn how in our Custom Instrumentation content.

While you're testing, set TracesSampleRate to 1.0, as that ensures that every transaction will be sent to Sentry.

Once testing is complete, you may want to set a lower TracesSampleRate value, or switch to using TracesSampler to selectively sample and filter your transactions, based on contextual data.

jamescrosswell commented 11 months ago

https://docs.sentry.io/platforms/dotnet/guides/aspnetcore/performance/

We could expand on this, for users coming back after using the middleware and new users, that wonder what setting the sample rate does

Do you mean like some docs saying that people no longer need to call UseSentryTracing? Maybe we add something after completing https://github.com/getsentry/sentry-dotnet/issues/2865 (explaining in which circumstances they would/wouldn't need to call this themselves manually)?

bruno-garcia commented 11 months ago

Do you mean like some docs saying that people no longer need to call UseSentryTracing? Maybe we add something after completing https://github.com/getsentry/sentry-dotnet/issues/2865 (explaining in which circumstances they would/wouldn't need to call this themselves manually)?

Yeah we usually write stuff on a migration document (https://docs.sentry.io/platforms/dotnet/migration/) A section on the aspnet core docs for performance clarifying how this works (calling out "From version XYZ you no longer need to call UseTracing because...") that's a good opportunity to explain how it works. Where we added it, and edge cases, etc.