You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 22, 2019. It is now read-only.
Not sure how to apply a "Question" label but that's what this is:
version = "react-appinsights": "^3.0.0-rc.6",
I really appreciate that the initial route is tracked upon entry of the app, however it appears this context is remaining for every future call in my custom dimensions.
You can see in this screenshot I enter at /login and localhost:3000/login persists in the custom dimensions even though I am never setting that.
Here is my helper class:
import env from '../environment';
import { reactAI } from 'react-appinsights';
import { ApplicationInsights, ITraceTelemetry } from '@microsoft/applicationinsights-web';
import { ICustomProperties } from '@microsoft/applicationinsights-core-js';
import { history } from './history';
class Insights {
private ai: ApplicationInsights;
constructor() {
this.ai = new ApplicationInsights({
config: {
instrumentationKey: `${env.appInsights.instrumentationKey}`,
extensions: [reactAI],
extensionConfig: {
[reactAI.extensionId]: {
debug: true,
history: history,
}
}
}
});
this.ai.loadAppInsights();
}
const AppInsightsService = new Insights();
export { AppInsightsService };
after calling this.ai.loadAppInsights() I tried calling reactAI.setContext({}) to remove any customDimensions but that did not help.