Skip to content

Commit

Permalink
feat: add apiVersion to telemetry (#448)
Browse files Browse the repository at this point in the history
* feat: add apiVersion

* fix: key

* refactor: move insights apiVersion into telemetryServise.ts
  • Loading branch information
alex-krasn authored Jul 24, 2020
1 parent fe8258f commit 55be542
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default class ComposeModelView extends React.Component<IComposeModelViewP
});
}
if (this.appInsights) {
this.appInsights.trackEvent({ name: "MODEL_COMPOSE_EVENT" });
this.appInsights.trackEvent({ name: "COMPOSE_MODEL_EVENT" });
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/react/components/pages/train/trainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export default class TrainPage extends React.Component<ITrainPageProps, ITrainPa
});
});
if (this.appInsights) {
this.appInsights.trackEvent({ name: "TRAIN_MODEL_EVENT" });
this.appInsights.trackEvent({name: "TRAIN_MODEL_EVENT"});
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/services/telemetryService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {ApplicationInsights} from '@microsoft/applicationinsights-web';
import {ReactPlugin} from '@microsoft/applicationinsights-react-js';
import { constants } from '../common/constants';

let reactPlugin = null;
let appInsights = null;
Expand Down Expand Up @@ -42,6 +43,7 @@ const createTelemetryService = () => {
});

appInsights.loadAppInsights();
appInsights.context.application.ver = constants.apiVersion;
};

return {reactPlugin, appInsights, initialize};
Expand Down

0 comments on commit 55be542

Please sign in to comment.