feat: add apiVersion to telemetry (#448)

* feat: add apiVersion

* fix: key

* refactor: move insights apiVersion into telemetryServise.ts
This commit is contained in:
alex-krasn 2020-07-24 13:33:54 -07:00 коммит произвёл GitHub
Родитель fe8258f9c7
Коммит 55be5427e4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -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" });
}
}

Просмотреть файл

@ -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"});
}
}

Просмотреть файл

@ -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;
@ -42,6 +43,7 @@ const createTelemetryService = () => {
});
appInsights.loadAppInsights();
appInsights.context.application.ver = constants.apiVersion;
};
return {reactPlugin, appInsights, initialize};