Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Support setting request operation name based on executing Razor Page #430

Closed
DamianEdwards opened this issue May 9, 2017 · 7 comments
Closed
Milestone

Comments

@DamianEdwards
Copy link
Member

Currently, the request telemetry doesn't construct a friendly operation name for requests served by Razor Pages in ASP.NET Core 2.0. The MvcDiagnosticsListener should be updated to grab details of the current executing page (if indeed it's a page) and use that to construct the request operation name, e.g. /Pages/Index.cshtml

@dnduffy dnduffy added this to the 2.2-beta1 milestone Jun 8, 2017
@dnduffy dnduffy modified the milestones: 2.2-beta2, 2.2-beta1 Jun 27, 2017
@AlexBulankou AlexBulankou modified the milestones: 2.2-beta2, 2.1.1 Jul 5, 2017
@pakrym
Copy link
Contributor

pakrym commented Jul 6, 2017

Why do you want page file name instead of it's action descriptor display name? (/Index in your case)

@DamianEdwards
Copy link
Member Author

Good question. What do you think folks would find more useful? That's what it really comes down to.

@pakrym
Copy link
Contributor

pakrym commented Jul 6, 2017

In case of pages having file name is nice, but it's very inconsistent with what we do for views.

@DamianEdwards
Copy link
Member Author

But I think that makes sense given the different way the route info is constructed, i.e. from the page file.

@dnduffy
Copy link
Member

dnduffy commented Jul 6, 2017

Personally I would expect to see the route that a user sees rather than the backing implementation details but I don't know if that view is representative of other users.

@pakrym
Copy link
Contributor

pakrym commented Jul 6, 2017

With file name operation name would look like GET /Pages/Index.cshtml and it looks like user requested actual file vs GET /Index if we use route values.

I implemented the route values way to start with, mostly because it's simpler and more consistent.

@DamianEdwards
Copy link
Member Author

Fair enough.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants