reacting to telemetry rename
This commit is contained in:
parent
7dac0986c2
commit
793504843e
|
|
@ -437,7 +437,11 @@ using Microsoft.Extensions.Logging
|
|||
|
||||
WriteLiteral(" <option");
|
||||
BeginWriteAttribute("value", " value=\"", 7693, "\"", 7713, 1);
|
||||
WriteAttributeValue("", 7701, severityInt, 7701, 12, false);
|
||||
#line 226 "DetailsPage.cshtml"
|
||||
WriteAttributeValue("", 7701, severityInt, 7701, 12, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" selected=\"selected\">");
|
||||
#line 226 "DetailsPage.cshtml"
|
||||
|
|
@ -456,7 +460,11 @@ using Microsoft.Extensions.Logging
|
|||
|
||||
WriteLiteral(" <option");
|
||||
BeginWriteAttribute("value", " value=\"", 7842, "\"", 7862, 1);
|
||||
WriteAttributeValue("", 7850, severityInt, 7850, 12, false);
|
||||
#line 230 "DetailsPage.cshtml"
|
||||
WriteAttributeValue("", 7850, severityInt, 7850, 12, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(">");
|
||||
#line 230 "DetailsPage.cshtml"
|
||||
|
|
@ -474,7 +482,11 @@ using Microsoft.Extensions.Logging
|
|||
|
||||
WriteLiteral(" </select>\r\n <input type=\"text\" name=\"name\"");
|
||||
BeginWriteAttribute("value", " value=\"", 7975, "\"", 8008, 1);
|
||||
WriteAttributeValue("", 7983, Model.Options.NamePrefix, 7983, 25, false);
|
||||
#line 234 "DetailsPage.cshtml"
|
||||
WriteAttributeValue("", 7983, Model.Options.NamePrefix, 7983, 25, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(@" />
|
||||
<input type=""submit"" value=""filter"" />
|
||||
|
|
|
|||
|
|
@ -209,7 +209,11 @@ using Microsoft.Extensions.Logging
|
|||
|
||||
WriteLiteral(" <option");
|
||||
BeginWriteAttribute("value", " value=\"", 4908, "\"", 4928, 1);
|
||||
WriteAttributeValue("", 4916, severityInt, 4916, 12, false);
|
||||
#line 138 "LogPage.cshtml"
|
||||
WriteAttributeValue("", 4916, severityInt, 4916, 12, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" selected=\"selected\">");
|
||||
#line 138 "LogPage.cshtml"
|
||||
|
|
@ -228,7 +232,11 @@ using Microsoft.Extensions.Logging
|
|||
|
||||
WriteLiteral(" <option");
|
||||
BeginWriteAttribute("value", " value=\"", 5057, "\"", 5077, 1);
|
||||
WriteAttributeValue("", 5065, severityInt, 5065, 12, false);
|
||||
#line 142 "LogPage.cshtml"
|
||||
WriteAttributeValue("", 5065, severityInt, 5065, 12, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(">");
|
||||
#line 142 "LogPage.cshtml"
|
||||
|
|
@ -246,7 +254,11 @@ using Microsoft.Extensions.Logging
|
|||
|
||||
WriteLiteral(" </select>\r\n <input type=\"text\" name=\"name\"");
|
||||
BeginWriteAttribute("value", " value=\"", 5190, "\"", 5223, 1);
|
||||
WriteAttributeValue("", 5198, Model.Options.NamePrefix, 5198, 25, false);
|
||||
#line 146 "LogPage.cshtml"
|
||||
WriteAttributeValue("", 5198, Model.Options.NamePrefix, 5198, 25, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(@" />
|
||||
<input type=""submit"" value=""filter"" />
|
||||
|
|
@ -304,10 +316,18 @@ using Microsoft.Extensions.Logging
|
|||
|
||||
WriteLiteral(" \t<td><a");
|
||||
BeginWriteAttribute("href", " href=\"", 6287, "\"", 6307, 1);
|
||||
WriteAttributeValue("", 6294, activityPath, 6294, 13, false);
|
||||
#line 178 "LogPage.cshtml"
|
||||
WriteAttributeValue("", 6294, activityPath, 6294, 13, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
BeginWriteAttribute("title", " title=\"", 6308, "\"", 6339, 1);
|
||||
WriteAttributeValue("", 6316, activity.HttpInfo.Path, 6316, 23, false);
|
||||
#line 178 "LogPage.cshtml"
|
||||
WriteAttributeValue("", 6316, activity.HttpInfo.Path, 6316, 23, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(">");
|
||||
#line 178 "LogPage.cshtml"
|
||||
|
|
@ -344,10 +364,18 @@ using Microsoft.Extensions.Logging
|
|||
|
||||
WriteLiteral(" <td colspan=\"4\"><a");
|
||||
BeginWriteAttribute("href", " href=\"", 6729, "\"", 6749, 1);
|
||||
WriteAttributeValue("", 6736, activityPath, 6736, 13, false);
|
||||
#line 185 "LogPage.cshtml"
|
||||
WriteAttributeValue("", 6736, activityPath, 6736, 13, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
BeginWriteAttribute("title", " title=\"", 6750, "\"", 6778, 1);
|
||||
WriteAttributeValue("", 6758, activity.Root.State, 6758, 20, false);
|
||||
#line 185 "LogPage.cshtml"
|
||||
WriteAttributeValue("", 6758, activity.Root.State, 6758, 20, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(">");
|
||||
#line 185 "LogPage.cshtml"
|
||||
|
|
@ -366,7 +394,11 @@ using Microsoft.Extensions.Logging
|
|||
|
||||
WriteLiteral(" <td colspan=\"4\"><a");
|
||||
BeginWriteAttribute("href", " href=\"", 6941, "\"", 6961, 1);
|
||||
WriteAttributeValue("", 6948, activityPath, 6948, 13, false);
|
||||
#line 189 "LogPage.cshtml"
|
||||
WriteAttributeValue("", 6948, activityPath, 6948, 13, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(">Non-scope Log</a></td>\r\n");
|
||||
#line 190 "LogPage.cshtml"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Diagnostics.Tracing;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
|
@ -17,6 +17,7 @@ using Microsoft.AspNet.Http;
|
|||
using Microsoft.Dnx.Compilation;
|
||||
using Microsoft.Dnx.Runtime;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StackFrame = Microsoft.AspNet.Diagnostics.Views.StackFrame;
|
||||
|
||||
namespace Microsoft.AspNet.Diagnostics
|
||||
{
|
||||
|
|
@ -30,7 +31,7 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
private static readonly bool IsMono = Type.GetType("Mono.Runtime") != null;
|
||||
private readonly ILogger _logger;
|
||||
private readonly IFileProvider _fileProvider;
|
||||
private readonly TelemetrySource _telemetrySource;
|
||||
private readonly DiagnosticSource _diagnosticSource;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DeveloperExceptionPageMiddleware"/> class
|
||||
|
|
@ -42,7 +43,7 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
ErrorPageOptions options,
|
||||
ILoggerFactory loggerFactory,
|
||||
IApplicationEnvironment appEnvironment,
|
||||
TelemetrySource telemetrySource)
|
||||
DiagnosticSource diagnosticSource)
|
||||
{
|
||||
if (next == null)
|
||||
{
|
||||
|
|
@ -58,7 +59,7 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
_options = options;
|
||||
_logger = loggerFactory.CreateLogger<DeveloperExceptionPageMiddleware>();
|
||||
_fileProvider = options.FileProvider ?? new PhysicalFileProvider(appEnvironment.ApplicationBasePath);
|
||||
_telemetrySource = telemetrySource;
|
||||
_diagnosticSource = diagnosticSource;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -90,7 +91,10 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
|
||||
await DisplayException(context, ex);
|
||||
|
||||
_telemetrySource.WriteTelemetry("Microsoft.AspNet.Diagnostics.UnhandledException", new { httpContext = context, exception = ex });
|
||||
if (_diagnosticSource.IsEnabled("Microsoft.AspNet.Diagnostics.UnhandledException"))
|
||||
{
|
||||
_diagnosticSource.Write("Microsoft.AspNet.Diagnostics.UnhandledException", new { httpContext = context, exception = ex });
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,11 @@ using Microsoft.AspNet.Diagnostics
|
|||
|
||||
WriteLiteral(" <li class=\"frame\"");
|
||||
BeginWriteAttribute("tabindex", " tabindex=\"", 1269, "\"", 1289, 1);
|
||||
WriteAttributeValue("", 1280, tabIndex, 1280, 9, false);
|
||||
#line 41 "CompilationErrorPage.cshtml"
|
||||
WriteAttributeValue("", 1280, tabIndex, 1280, 9, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(">\r\n");
|
||||
#line 42 "CompilationErrorPage.cshtml"
|
||||
|
|
@ -204,7 +208,11 @@ using Microsoft.AspNet.Diagnostics
|
|||
|
||||
WriteLiteral(" <ol");
|
||||
BeginWriteAttribute("start", " start=\"", 1813, "\"", 1842, 1);
|
||||
WriteAttributeValue("", 1821, frame.PreContextLine, 1821, 21, false);
|
||||
#line 53 "CompilationErrorPage.cshtml"
|
||||
WriteAttributeValue("", 1821, frame.PreContextLine, 1821, 21, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" class=\"collapsible\">\r\n");
|
||||
#line 54 "CompilationErrorPage.cshtml"
|
||||
|
|
@ -242,7 +250,11 @@ using Microsoft.AspNet.Diagnostics
|
|||
|
||||
WriteLiteral(" <ol");
|
||||
BeginWriteAttribute("start", " start=\"", 2223, "\"", 2242, 1);
|
||||
WriteAttributeValue("", 2231, frame.Line, 2231, 11, false);
|
||||
#line 60 "CompilationErrorPage.cshtml"
|
||||
WriteAttributeValue("", 2231, frame.Line, 2231, 11, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" class=\"highlight\">\r\n");
|
||||
#line 61 "CompilationErrorPage.cshtml"
|
||||
|
|
@ -287,7 +299,11 @@ using Microsoft.AspNet.Diagnostics
|
|||
|
||||
WriteLiteral(" <ol");
|
||||
BeginWriteAttribute("start", " start=\'", 2669, "\'", 2694, 1);
|
||||
WriteAttributeValue("", 2677, frame.Line + 1, 2677, 17, false);
|
||||
#line 68 "CompilationErrorPage.cshtml"
|
||||
WriteAttributeValue("", 2677, frame.Line + 1, 2677, 17, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" class=\"collapsible\">\r\n");
|
||||
#line 69 "CompilationErrorPage.cshtml"
|
||||
|
|
|
|||
|
|
@ -70,7 +70,11 @@ using Microsoft.AspNet.Diagnostics
|
|||
|
||||
WriteLiteral("<!DOCTYPE html>\r\n<html");
|
||||
BeginWriteAttribute("lang", " lang=\"", 497, "\"", 558, 1);
|
||||
WriteAttributeValue("", 504, CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, 504, 54, false);
|
||||
#line 22 "ErrorPage.cshtml"
|
||||
WriteAttributeValue("", 504, CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, 504, 54, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" xmlns=\"http://www.w3.org/1999/xhtml\">\r\n <head>\r\n <meta charset=\"utf-8\"" +
|
||||
" />\r\n <title>");
|
||||
|
|
@ -153,7 +157,11 @@ using Microsoft.AspNet.Diagnostics
|
|||
#line hidden
|
||||
WriteLiteral(" in <code");
|
||||
BeginWriteAttribute("title", " title=\"", 1874, "\"", 1898, 1);
|
||||
WriteAttributeValue("", 1882, firstFrame.File, 1882, 16, false);
|
||||
#line 49 "ErrorPage.cshtml"
|
||||
WriteAttributeValue("", 1882, firstFrame.File, 1882, 16, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(">");
|
||||
#line 49 "ErrorPage.cshtml"
|
||||
|
|
@ -282,7 +290,11 @@ using Microsoft.AspNet.Diagnostics
|
|||
|
||||
WriteLiteral(" <li class=\"frame\"");
|
||||
BeginWriteAttribute("tabindex", " tabindex=\"", 3302, "\"", 3322, 1);
|
||||
WriteAttributeValue("", 3313, tabIndex, 3313, 9, false);
|
||||
#line 85 "ErrorPage.cshtml"
|
||||
WriteAttributeValue("", 3313, tabIndex, 3313, 9, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(">\r\n");
|
||||
#line 86 "ErrorPage.cshtml"
|
||||
|
|
@ -328,7 +340,11 @@ using Microsoft.AspNet.Diagnostics
|
|||
#line hidden
|
||||
WriteLiteral(" in <code");
|
||||
BeginWriteAttribute("title", " title=\"", 3717, "\"", 3736, 1);
|
||||
WriteAttributeValue("", 3725, frame.File, 3725, 11, false);
|
||||
#line 93 "ErrorPage.cshtml"
|
||||
WriteAttributeValue("", 3725, frame.File, 3725, 11, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(">");
|
||||
#line 93 "ErrorPage.cshtml"
|
||||
|
|
@ -373,7 +389,11 @@ using Microsoft.AspNet.Diagnostics
|
|||
|
||||
WriteLiteral(" <ol");
|
||||
BeginWriteAttribute("start", " start=\"", 4167, "\"", 4196, 1);
|
||||
WriteAttributeValue("", 4175, frame.PreContextLine, 4175, 21, false);
|
||||
#line 101 "ErrorPage.cshtml"
|
||||
WriteAttributeValue("", 4175, frame.PreContextLine, 4175, 21, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" class=\"collapsible\">\r\n");
|
||||
#line 102 "ErrorPage.cshtml"
|
||||
|
|
@ -411,7 +431,11 @@ using Microsoft.AspNet.Diagnostics
|
|||
|
||||
WriteLiteral("\r\n <ol");
|
||||
BeginWriteAttribute("start", " start=\"", 4635, "\"", 4654, 1);
|
||||
WriteAttributeValue("", 4643, frame.Line, 4643, 11, false);
|
||||
#line 109 "ErrorPage.cshtml"
|
||||
WriteAttributeValue("", 4643, frame.Line, 4643, 11, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" class=\"highlight\">\r\n");
|
||||
#line 110 "ErrorPage.cshtml"
|
||||
|
|
@ -456,7 +480,11 @@ using Microsoft.AspNet.Diagnostics
|
|||
|
||||
WriteLiteral(" <ol");
|
||||
BeginWriteAttribute("start", " start=\'", 5147, "\'", 5172, 1);
|
||||
WriteAttributeValue("", 5155, frame.Line + 1, 5155, 17, false);
|
||||
#line 118 "ErrorPage.cshtml"
|
||||
WriteAttributeValue("", 5155, frame.Line + 1, 5155, 17, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" class=\"collapsible\">\r\n");
|
||||
#line 119 "ErrorPage.cshtml"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.Tracing;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.AspNet.Http;
|
||||
|
|
@ -18,13 +18,13 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
private readonly ExceptionHandlerOptions _options;
|
||||
private readonly ILogger _logger;
|
||||
private readonly Func<object, Task> _clearCacheHeadersDelegate;
|
||||
private readonly TelemetrySource _telemetrySource;
|
||||
private readonly DiagnosticSource _diagnosticSource;
|
||||
|
||||
public ExceptionHandlerMiddleware(
|
||||
RequestDelegate next,
|
||||
ILoggerFactory loggerFactory,
|
||||
ExceptionHandlerOptions options,
|
||||
TelemetrySource telemetrySource)
|
||||
DiagnosticSource diagnosticSource)
|
||||
{
|
||||
_next = next;
|
||||
_options = options;
|
||||
|
|
@ -34,7 +34,7 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
_options.ExceptionHandler = _next;
|
||||
}
|
||||
_clearCacheHeadersDelegate = ClearCacheHeaders;
|
||||
_telemetrySource = telemetrySource;
|
||||
_diagnosticSource = diagnosticSource;
|
||||
}
|
||||
|
||||
public async Task Invoke(HttpContext context)
|
||||
|
|
@ -70,8 +70,11 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
context.Response.OnStarting(_clearCacheHeadersDelegate, context.Response);
|
||||
|
||||
await _options.ExceptionHandler(context);
|
||||
|
||||
_telemetrySource.WriteTelemetry("Microsoft.AspNet.Diagnostics.HandledException", new { httpContext = context, exception = ex });
|
||||
|
||||
if (_diagnosticSource.IsEnabled("Microsoft.AspNet.Diagnostics.HandledException"))
|
||||
{
|
||||
_diagnosticSource.Write("Microsoft.AspNet.Diagnostics.HandledException", new { httpContext = context, exception = ex });
|
||||
}
|
||||
|
||||
// TODO: Optional re-throw? We'll re-throw the original exception by default if the error handler throws.
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,11 @@ using Microsoft.Dnx.Runtime;
|
|||
|
||||
WriteLiteral("<!DOCTYPE html>\r\n<html");
|
||||
BeginWriteAttribute("lang", " lang=\"", 429, "\"", 490, 1);
|
||||
WriteAttributeValue("", 436, CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, 436, 54, false);
|
||||
#line 21 "RuntimeInfoPage.cshtml"
|
||||
WriteAttributeValue("", 436, CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, 436, 54, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n " +
|
||||
" <title>");
|
||||
|
|
@ -209,7 +213,11 @@ using Microsoft.Dnx.Runtime;
|
|||
|
||||
WriteLiteral(" <tr");
|
||||
BeginWriteAttribute("class", " class=\"", 2209, "\"", 2237, 1);
|
||||
WriteAttributeValue("", 2217, even?"even":"odd", 2217, 20, false);
|
||||
#line 58 "RuntimeInfoPage.cshtml"
|
||||
WriteAttributeValue("", 2217, even?"even":"odd", 2217, 20, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(">\r\n <td>");
|
||||
#line 59 "RuntimeInfoPage.cshtml"
|
||||
|
|
|
|||
|
|
@ -33,7 +33,11 @@ using Microsoft.AspNet.Diagnostics
|
|||
|
||||
WriteLiteral("<!DOCTYPE html>\r\n<html");
|
||||
BeginWriteAttribute("lang", " lang=\"", 122, "\"", 204, 1);
|
||||
WriteAttributeValue("", 129, System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, 129, 75, false);
|
||||
#line 7 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 129, System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName, 129, 75, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(">\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n <title>");
|
||||
#line 10 "WelcomePage.cshtml"
|
||||
|
|
@ -133,10 +137,18 @@ using Microsoft.AspNet.Diagnostics
|
|||
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHL0rwADANq3ok68n5UR" +
|
||||
"AAAAAElFTkSuQmCC\"");
|
||||
BeginWriteAttribute("alt", "\r\n alt=\"", 7499, "\"", 7567, 1);
|
||||
WriteAttributeValue("", 7526, Resources.WelcomePageImageText_LightBulb, 7526, 41, false);
|
||||
#line 169 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 7526, Resources.WelcomePageImageText_LightBulb, 7526, 41, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
BeginWriteAttribute("title", " title=\"", 7568, "\"", 7617, 1);
|
||||
WriteAttributeValue("", 7576, Resources.WelcomePageImageText_LightBulb, 7576, 41, false);
|
||||
#line 169 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 7576, Resources.WelcomePageImageText_LightBulb, 7576, 41, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" width=\"274\" height=\"274\" /></div>\r\n <div class=\"browser\" style=\"opaci" +
|
||||
"ty: 1; visible: true;\">\r\n <img src=\"data:image/png;base64,iVBORw0" +
|
||||
|
|
@ -253,10 +265,18 @@ using Microsoft.AspNet.Diagnostics
|
|||
"AAMALXokn/reOBeCwC/ij+HGLcwMAMFj+Kq73f3n0P6eP/nHj+k831tdf+F78z0n8uBI/znGuAAAGwbX" +
|
||||
"48c24+P9N+oP/L8AAx5G6SMzC+fMAAAAASUVORK5CYII=\"");
|
||||
BeginWriteAttribute("alt", "\r\n alt=\"", 16705, "\"", 16772, 1);
|
||||
WriteAttributeValue("", 16733, Resources.WelcomePageImageText_Browser, 16733, 39, false);
|
||||
#line 172 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 16733, Resources.WelcomePageImageText_Browser, 16733, 39, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
BeginWriteAttribute("title", " title=\"", 16773, "\"", 16820, 1);
|
||||
WriteAttributeValue("", 16781, Resources.WelcomePageImageText_Browser, 16781, 39, false);
|
||||
#line 172 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 16781, Resources.WelcomePageImageText_Browser, 16781, 39, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" width=\"384\" height=\"305\" /><div>:-)</div>\r\n </div>\r\n <div " +
|
||||
"class=\"light second\">\r\n <img src=\"data:image/png;base64,iVBORw0KG" +
|
||||
|
|
@ -340,10 +360,18 @@ using Microsoft.AspNet.Diagnostics
|
|||
"EwaQ6SBSCCOBLOiclnX/70xJpl1t/ykOZHC57E/X+nnTbZ9EoEgC4DE044mHoCJ/F+AAQAgl3zNeDGxu" +
|
||||
"QAAAABJRU5ErkJggg==\"");
|
||||
BeginWriteAttribute("alt", "\r\n alt=\"", 23242, "\"", 23310, 1);
|
||||
WriteAttributeValue("", 23269, Resources.WelcomePageImageText_LightBulb, 23269, 41, false);
|
||||
#line 176 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 23269, Resources.WelcomePageImageText_LightBulb, 23269, 41, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
BeginWriteAttribute("title", " title=\"", 23311, "\"", 23360, 1);
|
||||
WriteAttributeValue("", 23319, Resources.WelcomePageImageText_LightBulb, 23319, 41, false);
|
||||
#line 176 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 23319, Resources.WelcomePageImageText_LightBulb, 23319, 41, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" width=\"274\" height=\"274\" /></div>\r\n <div class=\"bulb\">\r\n " +
|
||||
" <img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVoAAAKSCAYAAACTAhMyA" +
|
||||
|
|
@ -445,10 +473,18 @@ using Microsoft.AspNet.Diagnostics
|
|||
"AIILYDQAiC0AEILgNACCC2A0AIgtABCCyC0AAgtgNACMCcvisIoACT0fwEGAL+BBlr+j4JHAAAAAElFT" +
|
||||
"kSuQmCC\"");
|
||||
BeginWriteAttribute("alt", "\r\n alt=\"", 31210, "\"", 31279, 1);
|
||||
WriteAttributeValue("", 31238, Resources.WelcomePageImageText_LightBulb, 31238, 41, false);
|
||||
#line 179 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 31238, Resources.WelcomePageImageText_LightBulb, 31238, 41, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
BeginWriteAttribute("title", " title=\"", 31280, "\"", 31329, 1);
|
||||
WriteAttributeValue("", 31288, Resources.WelcomePageImageText_LightBulb, 31288, 41, false);
|
||||
#line 179 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 31288, Resources.WelcomePageImageText_LightBulb, 31288, 41, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" width=\"346\" height=\"658\" /></div>\r\n <div class=\"bottom\">\r\n " +
|
||||
" <img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLwAAADKCAYAAACv61n" +
|
||||
|
|
@ -637,10 +673,18 @@ using Microsoft.AspNet.Diagnostics
|
|||
"643H3SgNOZ3kR8AIAAAAAoIWjGV7UBrLAnc1h1wS8omp1OKzVxqxavihcX60FHHltZ8MF29a16fxojRS" +
|
||||
"uBwAAAACghf8vwABfcA5F9k0oGQAAAABJRU5ErkJggg==\"");
|
||||
BeginWriteAttribute("alt", "\r\n alt=\"", 46177, "\"", 46243, 1);
|
||||
WriteAttributeValue("", 46204, Resources.WelcomePageImageText_Skyline, 46204, 39, false);
|
||||
#line 182 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 46204, Resources.WelcomePageImageText_Skyline, 46204, 39, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
BeginWriteAttribute("title", " title=\"", 46244, "\"", 46291, 1);
|
||||
WriteAttributeValue("", 46252, Resources.WelcomePageImageText_Skyline, 46252, 39, false);
|
||||
#line 182 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 46252, Resources.WelcomePageImageText_Skyline, 46252, 39, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" width=\"1212\" height=\"202\" /></div>\r\n </div>\r\n </div>\r\n\r\n <div class" +
|
||||
"=\"content\">\r\n <div class=\"bodyHeadline\">");
|
||||
|
|
@ -694,10 +738,18 @@ using Microsoft.AspNet.Diagnostics
|
|||
"U1BLaYptsK4VktN9pRq0R9Y5/NMZL8slmC1ioSIu51ezNtkSACQ3HJckjXAX1v8nzsTxLwVBTT99OEiF" +
|
||||
"xkMsNIVpu/J6yjhBpEG5mhv7vI8l+AAQB7WiwH/DuungAAAABJRU5ErkJggg==\"");
|
||||
BeginWriteAttribute("alt", "\r\n alt=\"", 49123, "\"", 49187, 1);
|
||||
WriteAttributeValue("", 49146, Resources.WelcomePageImageText_LearnMore, 49146, 41, false);
|
||||
#line 191 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 49146, Resources.WelcomePageImageText_LearnMore, 49146, 41, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
BeginWriteAttribute("title", " title=\"", 49188, "\"", 49237, 1);
|
||||
WriteAttributeValue("", 49196, Resources.WelcomePageImageText_LearnMore, 49196, 41, false);
|
||||
#line 191 "WelcomePage.cshtml"
|
||||
WriteAttributeValue("", 49196, Resources.WelcomePageImageText_LearnMore, 49196, 41, false);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
EndWriteAttribute();
|
||||
WriteLiteral(" width=\"58\" height=\"29\" /></div>\r\n </a>\r\n </div>\r\n\r\n</body>\r\n</html>\r\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"Microsoft.Extensions.OptionsModel": "1.0.0-*",
|
||||
"Microsoft.Dnx.Compilation.Abstractions": "1.0.0-*",
|
||||
"Microsoft.Extensions.WebEncoders.Core": "1.0.0-*",
|
||||
"System.Diagnostics.Tracing.Telemetry": "4.0.0-beta-*"
|
||||
"System.Diagnostics.DiagnosticSource": "4.0.0-beta-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Tracing;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
|
@ -11,7 +11,6 @@ using System.Runtime.Versioning;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.AspNet.Diagnostics.Views;
|
||||
using Microsoft.AspNet.FileProviders;
|
||||
using Microsoft.AspNet.TestHost;
|
||||
using Microsoft.AspNet.Testing;
|
||||
|
|
@ -20,6 +19,7 @@ using Microsoft.Extensions.DependencyInjection;
|
|||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using Xunit;
|
||||
using StackFrame = Microsoft.AspNet.Diagnostics.Views.StackFrame;
|
||||
|
||||
namespace Microsoft.AspNet.Diagnostics
|
||||
{
|
||||
|
|
@ -303,7 +303,7 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
errorPageOptions,
|
||||
new LoggerFactory(),
|
||||
new TestApplicationEnvironment(),
|
||||
new TelemetryListener("Microsoft.Aspnet"));
|
||||
new DiagnosticListener("Microsoft.Aspnet"));
|
||||
|
||||
return middleware;
|
||||
}
|
||||
|
|
@ -478,21 +478,21 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public async Task UnhandledErrorsWriteToDiagnosticTelemetryWhenUsingExceptionPage()
|
||||
public async Task UnhandledErrorsWriteToDiagnosticWhenUsingExceptionPage()
|
||||
{
|
||||
// Arrange
|
||||
TelemetryListener telemetryListener = null;
|
||||
DiagnosticListener diagnosticListener = null;
|
||||
var server = TestServer.Create(app =>
|
||||
{
|
||||
telemetryListener = app.ApplicationServices.GetRequiredService<TelemetryListener>();
|
||||
diagnosticListener = app.ApplicationServices.GetRequiredService<DiagnosticListener>();
|
||||
app.UseDeveloperExceptionPage();
|
||||
app.Run(context =>
|
||||
{
|
||||
throw new Exception("Test exception");
|
||||
});
|
||||
});
|
||||
var listener = new TestTelemetryListener();
|
||||
telemetryListener.SubscribeWithAdapter(listener);
|
||||
var listener = new TestDiagnosticListener();
|
||||
diagnosticListener.SubscribeWithAdapter(listener);
|
||||
|
||||
// Act
|
||||
await server.CreateClient().GetAsync("/path");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Tracing;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
|
|
@ -325,14 +325,14 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public async Task HandledErrorsWriteToDiagnosticTelemetryWhenUsingExceptionHandler()
|
||||
public async Task HandledErrorsWriteToDiagnosticWhenUsingExceptionHandler()
|
||||
{
|
||||
// Arrange
|
||||
TelemetryListener telemetryListener = null;
|
||||
DiagnosticListener diagnosticListener = null;
|
||||
|
||||
var server = TestServer.Create(app =>
|
||||
{
|
||||
telemetryListener = app.ApplicationServices.GetRequiredService<TelemetryListener>();
|
||||
diagnosticListener = app.ApplicationServices.GetRequiredService<DiagnosticListener>();
|
||||
|
||||
app.UseExceptionHandler("/handle-errors");
|
||||
app.Map("/handle-errors", (innerAppBuilder) =>
|
||||
|
|
@ -348,8 +348,8 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
});
|
||||
});
|
||||
|
||||
var listener = new TestTelemetryListener();
|
||||
telemetryListener.SubscribeWithAdapter(listener);
|
||||
var listener = new TestDiagnosticListener();
|
||||
diagnosticListener.SubscribeWithAdapter(listener);
|
||||
|
||||
// Act
|
||||
await server.CreateClient().GetAsync(string.Empty);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.Extensions.TelemetryAdapter;
|
||||
using Microsoft.Extensions.DiagnosticAdapter;
|
||||
|
||||
namespace Microsoft.AspNet.Diagnostics
|
||||
{
|
||||
public class TestTelemetryListener
|
||||
public class TestDiagnosticListener
|
||||
{
|
||||
public class OnRequestEventData
|
||||
{
|
||||
|
|
@ -24,7 +24,7 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
public OnExceptionEventData DiagnosticUnhandledException { get; set; }
|
||||
public OnExceptionEventData DiagnosticHandledException { get; set; }
|
||||
|
||||
[TelemetryName("Microsoft.AspNet.Hosting.BeginRequest")]
|
||||
[DiagnosticName("Microsoft.AspNet.Hosting.BeginRequest")]
|
||||
public virtual void OnBeginRequest(IProxyHttpContext httpContext)
|
||||
{
|
||||
BeginRequest = new OnRequestEventData()
|
||||
|
|
@ -33,7 +33,7 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
};
|
||||
}
|
||||
|
||||
[TelemetryName("Microsoft.AspNet.Hosting.EndRequest")]
|
||||
[DiagnosticName("Microsoft.AspNet.Hosting.EndRequest")]
|
||||
public virtual void OnEndRequest(IProxyHttpContext httpContext)
|
||||
{
|
||||
EndRequest = new OnRequestEventData()
|
||||
|
|
@ -42,7 +42,7 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
};
|
||||
}
|
||||
|
||||
[TelemetryName("Microsoft.AspNet.Hosting.UnhandledException")]
|
||||
[DiagnosticName("Microsoft.AspNet.Hosting.UnhandledException")]
|
||||
public virtual void OnHostingUnhandledException(IProxyHttpContext httpContext, IProxyException exception)
|
||||
{
|
||||
HostingUnhandledException = new OnExceptionEventData()
|
||||
|
|
@ -52,7 +52,7 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
};
|
||||
}
|
||||
|
||||
[TelemetryName("Microsoft.AspNet.Diagnostics.UnhandledException")]
|
||||
[DiagnosticName("Microsoft.AspNet.Diagnostics.UnhandledException")]
|
||||
public virtual void OnDiagnosticUnhandledException(IProxyHttpContext httpContext, IProxyException exception)
|
||||
{
|
||||
DiagnosticUnhandledException = new OnExceptionEventData()
|
||||
|
|
@ -62,7 +62,7 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
};
|
||||
}
|
||||
|
||||
[TelemetryName("Microsoft.AspNet.Diagnostics.HandledException")]
|
||||
[DiagnosticName("Microsoft.AspNet.Diagnostics.HandledException")]
|
||||
public virtual void OnDiagnosticHandledException(IProxyHttpContext httpContext, IProxyException exception)
|
||||
{
|
||||
DiagnosticHandledException = new OnExceptionEventData()
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
"Microsoft.AspNet.TestHost": "1.0.0-*",
|
||||
"Microsoft.AspNet.Testing": "1.0.0-*",
|
||||
"Microsoft.Extensions.DependencyInjection": "1.0.0-*",
|
||||
"Microsoft.Extensions.TelemetryAdapter": "1.0.0-*",
|
||||
"Microsoft.Extensions.DiagnosticAdapter": "1.0.0-*",
|
||||
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue