Skip to content

Commit 4d8390b

Browse files
authored
Merge pull request #10 from talis/ELE-2170-new-relic-client-errors
ELE-2170 New Relic support
2 parents 0491912 + 8096846 commit 4d8390b

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.1.6 (2019-12-2)
2+
3+
Improvement:
4+
5+
- Added support for NewRelic logging so errors can be sent there if needed
6+
17
## 2.1.4 (2016-11-01)
28

39
Improvement:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ The config object to be passed to each service has the following properties:
1616
- LOGGING_TYPE (can be local|remote|none)
1717
- local: log to local console only
1818
- remote: log to local console and remote endpoint
19+
- newrelic: forward onto the NewRelic error handler if there's one available
1920
- none: perform no logging
2021
- REMOTE_LOGGING_ENDPOINT: the full URL to the endpoint where log messages are sent via AJAX POST
2122
- REMOTE_ERROR_REPORT_ENDPOINT: the full URL to the endpoint where user error reports will be sent via AJAX POST

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "app-logger-angular",
3-
"version": "2.1.5",
3+
"version": "2.1.6",
44
"main": "./js/logging.js",
55
"description": "Client side logging sent to the server",
66
"repository": {

js/logging.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ loggingModule.factory(
4949
$log.error.apply($log, arguments);
5050
}
5151

52+
if (LOGGING_CONFIG.LOGGING_TYPE === 'newrelic' && $window.NREUM && $window.NREUM.noticeError) {
53+
$window.NREUM.noticeError(exception);
54+
}
55+
5256
// check if the config says we should log to the remote, and also if a remote endpoint was specified
5357
if (LOGGING_CONFIG.LOGGING_TYPE === 'remote' && LOGGING_CONFIG.REMOTE_LOGGING_ENDPOINT) {
5458
// now log server side.

0 commit comments

Comments
 (0)