fix installation registration

This commit is contained in:
Michael Schramm 2020-06-01 23:35:45 +02:00
parent 5f320f6b77
commit 55ab5062de

View File

@ -12,13 +12,16 @@ export class InstallationMetricsService implements OnApplicationBootstrap {
}
async onApplicationBootstrap(): Promise<void> {
const tracker = new MatomoTracker(1, this.host)
const tracker = new MatomoTracker(2, this.host)
tracker.on('error', () => {
this.logger.error('failed to register instance')
this.logger.error('failed to add installation metrics')
})
this.logger.info('try to add installation metrics')
tracker.track({
url: `http://localhost/version/${process.env.npm_package_version}`,
// eslint-disable-next-line @typescript-eslint/camelcase
action_name: 'startup',
ua: process.arch