3
votes

I am creating a angular app and trying to add appinsights to the angular app. The config is set as follows:

private config: Microsoft.ApplicationInsights.IConfig = {
    instrumentationKey: environment.appInsights.instrumentationKey,
    disableCorrelationHeaders: false,
    enableDebug : true,
    verboseLogging : true
}

and app insights is initialized as follows in a angular service.

if (!AppInsights.config) {
  AppInsights.downloadAndSetup(this.config);
}

But I am not seeing dependency calls having the following headers 'Request-Id' 'Request-Context'

Was anyone successful in getting this to work?

1
I have tested app insights on my side, I didn't see these two headers. And in this official article,we also can not see Request-Id and Request-Context header. So what did you mean? Are they customs header in your code? - Janley Zhang
github.com/Microsoft/ApplicationInsights-JS/blob/master/… Kindly look at this. These are not custom headers. But app insight headers. - Gurpreet Singh
In this official article, it mentioned the correlation headers like Request-Id and Request-Context, you could refer to. - Janley Zhang

1 Answers