@@ -53,8 +53,8 @@ loggingModule.factory(
53
53
return false ;
54
54
}
55
55
56
- if ( LOGGING_CONFIG . FORWARD_TO_NEWRELIC && $window . NREUM && $window . NREUM . noticeError ) {
57
- $window . NREUM . noticeError ( exception , { url : $window . location . href } ) ;
56
+ if ( LOGGING_CONFIG . FORWARD_TO_INSTANA && typeof ineum !== undefined && ineum ) {
57
+ ineum ( 'reportError' , exception ) ;
58
58
}
59
59
60
60
// check if the config says we should log to the remote, and also if a remote endpoint was specified
@@ -123,7 +123,7 @@ loggingModule.factory(
123
123
return ( iRequestedLevel >= iLoggingThreshold ) ;
124
124
} ;
125
125
126
- var log = function ( severity , message , desc , sendToNewRelic ) {
126
+ var log = function ( severity , message , desc , sendToInstana ) {
127
127
if ( ! isLoggingEnabledForSeverity ( severity ) ) {
128
128
return ;
129
129
}
@@ -148,8 +148,12 @@ loggingModule.factory(
148
148
return false ;
149
149
}
150
150
151
- if ( sendToNewRelic && $window . NREUM && $window . NREUM . noticeError ) {
152
- $window . NREUM . noticeError ( message , { desc : desc , url : $window . location . href } ) ;
151
+ if ( sendToInstana ) {
152
+ ineum ( 'reportError' , message , {
153
+ meta : {
154
+ errorDescription : JSON . stringify ( desc )
155
+ }
156
+ } ) ;
153
157
}
154
158
155
159
// check if the config says we should log to the remote, and also if a remote endpoint was specified
@@ -190,8 +194,8 @@ loggingModule.factory(
190
194
log ( 'warn' , message , desc ) ;
191
195
} ,
192
196
error : function ( message , desc ) {
193
- var sendToNewRelic = LOGGING_CONFIG . FORWARD_TO_NEWRELIC && $window . NREUM && $window . NREUM . noticeError ;
194
- log ( 'error' , message , desc , sendToNewRelic ) ;
197
+ var sendToInstana = LOGGING_CONFIG . FORWARD_TO_INSTANA && typeof ineum !== undefined && ineum ;
198
+ log ( 'error' , message , desc , sendToInstana ) ;
195
199
} ,
196
200
setLoggingThreshold : function ( level ) {
197
201
/*
0 commit comments