Skip to content

Commit

Permalink
different instrumentation key for each environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik committed Jul 12, 2019
1 parent d602fd0 commit ed1da77
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/src/app/services/common/application-insights.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ApplicationInsights } from '@microsoft/applicationinsights-web';
import { ActivatedRouteSnapshot, ResolveEnd, Router } from '@angular/router';
import { filter } from 'rxjs/operators';
import { Subscription } from 'rxjs';
import { environment } from 'src/environments/environment';

@Injectable({
providedIn: 'root'
Expand All @@ -13,7 +14,7 @@ export class ApplicationInsightsService {

private appInsights = new ApplicationInsights({
config: {
instrumentationKey: '...'
instrumentationKey: environment.instrumentationKey
}
});

Expand Down
3 changes: 2 additions & 1 deletion src/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export const environment = {
production: true
production: true,
instrumentationKey: '...'
};
3 changes: 2 additions & 1 deletion src/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false
production: false,
instrumentationKey: '...'
};

/*
Expand Down

0 comments on commit ed1da77

Please sign in to comment.