microsoft / ApplicationInsights-dotnet-server

Microsoft Application Insights for .NET Web Applications
https://azure.microsoft.com/services/application-insights/
133 stars 67 forks source link

Support correlation-context in absence of Request-Id or traceparent #1215

Closed lmolkova closed 4 years ago

lmolkova commented 5 years ago

Correlation-Context is used by partner teams in Microsoft to propagate arbitrary key-value pairs along with request flow and in addition to tracing identifiers (Request-Id, cV or traceparent).

When 1P app instrumented with cV attempts to work with app that is instrumented with ApplicationInsights, AppInsights ignores Correlation-Context. It happens because Correlation-Context according to spec is an extension on top of Request-Id (or traceparent) and is not read when Request-Id is not present.

We should read Correlation-Context regardless of Request-Id (traceprent) presence.