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

Current Activity is null for event #1009

Closed
lmolkova opened this issue Sep 26, 2018 · 1 comment
Closed

Current Activity is null for event #1009

lmolkova opened this issue Sep 26, 2018 · 1 comment

Comments

@lmolkova
Copy link
Member

We have a bunch of errors like:

Current Activity is null for event = 'System.Net.Http.HttpRequestOut.Stop'

it also affects ServiceBus.Receive and Process.

It prevents telemetry from being collected.

I was not able to reproduce it and cannot imagine a valid case where this could happen. It indicates some bug.

@lmolkova
Copy link
Member Author

lmolkova commented Sep 27, 2018

Ok, so I was able to find the root cause of this issue and repro it locally.

Apparently, it happens when multiple apps are hosted in the same process (somewhat typical for ServiceFabric and possible on AspNet Core).

In this case, each app initializes its own AppInsights pipeline and multiple modules start working in parallel.

Because of changes in #952, we in some cases we stop an Activity on the first app. Causing all other hosts to fail with null Current Activity and preventing duplicate dependency collection.

Multi-tracking is handled here: microsoft/ApplicationInsights-aspnetcore#621

I'm closing this issue as it will be addressed by fixing microsoft/ApplicationInsights-aspnetcore#621, which I'm working on.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant