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](https://github.com/aspnet/Mvc/blob/760c8f38678118734399c58c2dac981ea6e47046/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Internal/MvcViewFeaturesDiagnosticSourceExtensions.cs#L88-L99) and .[AfterView](https://github.com/aspnet/Mvc/blob/760c8f38678118734399c58c2dac981ea6e47046/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Internal/MvcViewFeaturesDiagnosticSourceExtensions.cs#L101-L112) are called for regular views ([here](https://github.com/aspnet/Mvc/blob/8d5abd433fc74204c8757d6605adf0c41fea60b2/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/ViewExecutor.cs#L245-L249)): ```c# DiagnosticSource.BeforeView(view, viewContext); await view.RenderAsync(viewContext); DiagnosticSource.AfterView(view, viewContext); ``` Compared to the `RenderPartial` (and `Async`, etc.) pipeline ([here](https://github.com/aspnet/Mvc/blob/8f8bf5af341b5cc07e0611dc9a3a02e471e2bf63/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/HtmlHelper.cs#L588)): ```c# await viewEngineResult.View.RenderAsync(viewContext); ``` ...it's not wrapped in DiagnosticSource. The result is that instead of a rich profiling tree I can narrow issues down in like this: <img width="504" alt="screen shot 2017-05-01 at 19 58 33" src="https://cloud.githubusercontent.com/assets/454813/25599251/ade7ab36-2ea8-11e7-9fd2-88fb222f3145.png"> The best I can get is: <img width="402" alt="screen shot 2017-05-01 at 19 54 36" src="https://cloud.githubusercontent.com/assets/454813/25599178/0ae4b5dc-2ea8-11e7-91d2-83be4de9ec8c.png"> Was this an intentional decision? - If so: why? - If not: can I submit a PR to add the `.BeforeView` and `.AfterView` calls?
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?
.BeforeViewand.AfterViewcalls?