-
Notifications
You must be signed in to change notification settings - Fork 2.1k
DiagnosticSource.BeforeView/AfterView not called in RenderPartial #6222
Comments
We've only implemented DiagnosticSource eventing when/where someone has specifically asked for it 😆. I see no reason why we can't fix this. What's your proposal for the details of the event? @Eilon - opinion on a breaking change to
DiagnosticSouce as an additional constructor arg?
|
Unfortuantely, this is blocked by aspnet/Mvc#6222 which greatly diminishes view insight. Rather than breaking down timings into any particular view, they're all aggregated at the top view which is a major step backwards.
I'd expect it (naively) to call |
@rynowak I'm ok with a breaking change to this, though we can also do it without a breaking change by adding a 2nd ctor that has the extra param, and have the current ctor chain to the new one. I'm fine either way. |
I feel like since this is 2.0.0 we might as well go ahead and add the extra arg and not deal with the perma-cruft of an obsolete constructor. This is the default implementation of the |
@NickCraver - It looks like the existing code gives Feel free to send a PR. |
Implemented in #6386, closing out to cleanup. |
I was trying to move from wrapped views to DiagnosticSource for MVC profiling in ASP.NET Core, but I've come across a major difference in behavior.
Currently, DiagnosticSource.BeforeView and .AfterView are called for regular views (here):
Compared to the
RenderPartial
(andAsync
, etc.) pipeline (here):...it's not wrapped in DiagnosticSource. The result is that instead of a rich profiling tree I can narrow issues down in like this:

The best I can get is:

Was this an intentional decision?
.BeforeView
and.AfterView
calls?The text was updated successfully, but these errors were encountered: