Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Commit

Permalink
fix installation registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Schramm committed Jun 1, 2020
1 parent 5f320f6 commit 55ab506
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/service/installation.metrics.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 55ab506

Please sign in to comment.