-
Notifications
You must be signed in to change notification settings - Fork 601
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
Profiling EF Core broken by ConfigureAwait(false) #654
Comments
@RichardD2 you'll want to use v4+ which has solutions for many of these issues (using AsyncLocal for storage in this case). |
@NickCraver I'm using MiniProfiler v4.2.22. Unfortunately, since we rely on SSRS, we're stuck on .NET Framework, so we can't use any version of EF Core later than v3.1.32. |
@NickCraver I see what you mean - the DefaultProfileProvider uses an Perhaps I'm hitting a slightly different problem, but I'm definitely seeing queries missing from the MiniProfiler output when I use Maybe it's related to #173?
|
@RichardD2 I can't speak to older EF Core issues there - the profiler handles it but EF Core context we have no control over :( |
Same issue as #392, but this time for EF Core. (v3.1.x in an MVC5 / .NET Framework 4.8 application)
Any use of
.ConfigureAwait(false)
in the application causes subsequent queries to be missed by the EF Core profiler.Looking at the
RelationalDiagnosticListener
class, it makes extensive use ofMiniProfiler.Current
, which will benull
after anawait
ed call continues without the captured context.Is there any way to avoid this without dropping every use of
.ConfigureAwait(false)
from the codebase?The text was updated successfully, but these errors were encountered: