Skip to content
This repository has been archived by the owner on Jul 5, 2020. It is now read-only.

Commit

Permalink
Ignore unobserved task exceptions explicitly marked as observed (#1024)
Browse files Browse the repository at this point in the history
* Ignore unobserved task exceptions explicitly marked as observed
  • Loading branch information
i3arnon authored and cijothomas committed Jun 18, 2019
1 parent bb0064a commit 1f50be7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
If you are upgrading, and have added/modified TelemetryProcessors, make sure to copy them to the default sink section.
- [Microsoft.AspNet.TelemetryCorrelaiton package update to 1.0.4](https://github.com/Microsoft/ApplicationInsights-dotnet-server/issues/991)
- Add vmScaleSetName field to heartbeat properties collected by AzureInstanceMetadataTelemetryModule to allow navigation to right Azure VM Scale Set
- [Allow users to ignore specific UnobservedTaskExceptions](https://github.com/Microsoft/ApplicationInsights-dotnet-server/issues/1026)

## Version 2.8.0-beta1
- [Adds opt-in support for W3C distributed tracing standard](https://github.com/Microsoft/ApplicationInsights-dotnet-server/pull/945)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ public void Dispose()

private void TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs unobservedTaskExceptionEventArgs)
{
if (unobservedTaskExceptionEventArgs.Observed)
{
return;
}

WindowsServerEventSource.Log.TaskSchedulerOnUnobservedTaskException();

var exp = new ExceptionTelemetry(unobservedTaskExceptionEventArgs.Exception)
Expand Down

0 comments on commit 1f50be7

Please sign in to comment.