Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

DiagnosticSource.BeforeView/AfterView not called in RenderPartial #6222

@NickCraver

Description

@NickCraver

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):

DiagnosticSource.BeforeView(view, viewContext); await view.RenderAsync(viewContext); DiagnosticSource.AfterView(view, viewContext);

Compared to the RenderPartial (and Async, etc.) pipeline (here):

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:
screen shot 2017-05-01 at 19 58 33

The best I can get is:
screen shot 2017-05-01 at 19 54 36

Was this an intentional decision?

  • If so: why?
  • If not: can I submit a PR to add the .BeforeView and .AfterView calls?

Metadata

Metadata

Assignees

Labels

3 - Donebugup-for-grabsMembers of our awesome commnity can handle this issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions