Open lkohn opened 5 years ago
Hi @lkohn - can you please advise which version of react-appinsights you're using? I'd recommend using the latest RC from here. Install it by running:
npm install --save react-appinsights@beta
@hiraldesai We're using applicationinsights-js v1.0.20 and react-appinsights v2.0.2 . We'll give the @beta version a try and see if that helps.
Hi, There is an issue I've run into where when using
addTelemetryInitializer
to add custom meta data where it is not being called when initializing appinsights through React.AI but it does when initializing throughAppInsights.downloadAndSetup
.Here is the code snippet I have for setting up the initializer: ` AppInsights.queue.push(function() { AppInsights.context.addTelemetryInitializer(function(envelope) { const telemetryItem = envelope.data.baseData; const userMeta = extractUserProfileFromState(store.getState());
}); });
Initializing through
AppInsights.downloadAndSetup` seems work even for the React component performance tracking so I'm inclined to leave it since everything is working now. I'm not sure if this is by design / a quirk / a bug but I figured you would want to know.