Skip to content

Commit e402879

Browse files
committed
Simplifying trace source for error processing handler
1 parent d1cf72e commit e402879

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/WebJobs.Script.WebHost/Handlers/ExceptionProcessingHandler.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,8 @@ private static void DefaultExceptionHandler(ExceptionContext exceptionContext, A
101101

102102
private void TraceErrorEvent(ExceptionContext exceptionContext, ApiErrorModel error)
103103
{
104-
string controllerName = exceptionContext.ControllerContext?.ControllerDescriptor.ControllerName ?? "<unknown>";
105-
string actionName = exceptionContext.ActionContext?.ActionDescriptor.ActionName ?? "<unknown>";
106-
107104
string message = JsonConvert.SerializeObject(error);
108-
var traceEvent = new TraceEvent(TraceLevel.Error, message, $"ApiError.{controllerName}.{actionName}", exceptionContext.Exception);
105+
var traceEvent = new TraceEvent(TraceLevel.Error, message, $"ApiError", exceptionContext.Exception);
109106
_traceWriterLoader.Value.Trace(traceEvent);
110107
}
111108

0 commit comments

Comments
 (0)