-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from LearningLocker/newrelic
Adds newrelic tracking.
- Loading branch information
Showing
9 changed files
with
57 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import fakeTracker from 'jscommons/dist/tracker/fake'; | ||
import newRelicTracker from 'jscommons/dist/tracker/newrelic'; | ||
import Tracker from 'jscommons/dist/tracker/Tracker'; | ||
import config from './config'; | ||
|
||
/* istanbul ignore next */ | ||
const trackerFactory = async (): Promise<Tracker> => { | ||
if (config.tracker.newRelic.enabled) { | ||
process.env.NEW_RELIC_NO_CONFIG_FILE = config.tracker.newRelic.noConfigFile; | ||
process.env.NEW_RELIC_LOG = config.tracker.newRelic.log; | ||
process.env.NEW_RELIC_LOG_LEVEL = config.tracker.newRelic.logLevel; | ||
return newRelicTracker(); | ||
} | ||
return fakeTracker; | ||
}; | ||
|
||
export default trackerFactory(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters