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:
Родитель
3f3656a627
Коммит
719377993c
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче