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

Commit

Permalink
Bring arguments inline between before/after events
Browse files Browse the repository at this point in the history
  • Loading branch information
avanderhoorn authored and rynowak committed Oct 5, 2015
1 parent 32c174c commit a0764fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions src/Microsoft.AspNet.Mvc.Core/Controllers/FilterActionInvoker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,12 @@ private async Task<ActionExecutedContext> InvokeActionFilterAsync()
{
_telemetry.WriteTelemetry(
"Microsoft.AspNet.Mvc.BeforeActionMethod",
new { actionContext = ActionContext, arguments = _actionExecutingContext.ActionArguments });
new
{
actionContext = ActionContext,
arguments = _actionExecutingContext.ActionArguments,
controller = _actionExecutingContext.Controller
});
}

result = await InvokeActionAsync(_actionExecutingContext);
Expand All @@ -636,7 +641,13 @@ private async Task<ActionExecutedContext> InvokeActionFilterAsync()
{
_telemetry.WriteTelemetry(
"Microsoft.AspNet.Mvc.AfterActionMethod",
new { actionContext = ActionContext, result = result });
new
{
actionContext = ActionContext,
arguments = _actionExecutingContext.ActionArguments,
controller = _actionExecutingContext.Controller,
result = result
});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public async Task RouteAsync(RouteContext context)
{
_telemetry.WriteTelemetry(
"Microsoft.AspNet.Mvc.AfterAction",
new { actionDescriptor, httpContext = context.HttpContext });
new { actionDescriptor, httpContext = context.HttpContext, routeData = context.RouteData });
}

if (!context.IsHandled)
Expand Down

0 comments on commit a0764fa

Please sign in to comment.