microsoft / ApplicationInsights-aspnetcore

ASP.NET Core web applications monitoring
313 stars 123 forks source link

Do not set sampledOut flag if activity is recorded and parentId fixes #971

Closed lmolkova closed 5 years ago

lmolkova commented 5 years ago

If Activity is recorded, we are going to sample in proactively (i.e. give more weight for these items, see https://github.com/Microsoft/ApplicationInsights-dotnet/pull/1200)

When we proactively sample features out, we should check Activity.Recorded first and only sample out those which are not recorded.

Also, I noticed parent -id on requests is not set correctly in W3C format. fixing that.