1
0
Форкнуть 0

RequestTelemetry is not populated with HttpMethod which is obsolete field.

ExceptionTelemetry is not populated with HandledAt field which is obsolete.
This commit is contained in:
Cijo Thomas 2018-05-04 16:42:15 -07:00
Родитель 3f3656a627
Коммит 719377993c
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -36,6 +36,7 @@
/// <param name="telemetryConfiguration">The configuration instance to use.</param>
/// <param name="serviceOptions">Service options instance to use.</param>
/// <param name="httpContextAccessor">Http context accessor to use.</param>
/// <param name="encoder">Encoder used to encode user identity.</param>
public JavaScriptSnippet(TelemetryConfiguration telemetryConfiguration,
IOptions<ApplicationInsightsServiceOptions> serviceOptions,
IHttpContextAccessor httpContextAccessor,

Просмотреть файл

@ -272,8 +272,7 @@
{
telemetry.Name = httpContext.Request.Method + " " + httpContext.Request.Path.Value;
}
telemetry.HttpMethod = httpContext.Request.Method;
telemetry.Url = httpContext.Request.GetUri();
telemetry.Context.GetInternalContext().SdkVersion = this.sdkVersion;
this.client.TrackRequest(telemetry);
@ -296,8 +295,7 @@
telemetry.Success = false;
}
var exceptionTelemetry = new ExceptionTelemetry(exception);
exceptionTelemetry.HandledAt = ExceptionHandledAt.Platform;
var exceptionTelemetry = new ExceptionTelemetry(exception);
exceptionTelemetry.Context.GetInternalContext().SdkVersion = this.sdkVersion;
this.client.Track(exceptionTelemetry);
}

Просмотреть файл

@ -19,9 +19,10 @@
private List<IApplicationInsightDiagnosticListener> diagnosticListeners;
private bool isInitialized = false;
private readonly object lockObject = new object();
private TelemetryConfiguration configuration;
/// <summary>
/// RequestTrackingTelemetryModule
/// </summary>
public RequestTrackingTelemetryModule() : this(null)
{
}