This repository was archived by the owner on May 22, 2019. It is now read-only.

Description
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 through AppInsights.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());
telemetryItem.properties = telemetryItem.properties || {};
telemetryItem.properties["Application"] = APP_SETTINGS.moduleId;
if (userMeta) {
telemetryItem.properties["User Name"] = userMeta.id;
}
});
});
Initializing throughAppInsights.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.