You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/agent/api/index.js
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ var util = require('util')
4
4
varrequestSync=require('sync-request')
5
5
varisNumber=require('lodash.isnumber')
6
6
vardebug=require('debug')('risingstack/trace')
7
-
varformat=require('util').format
8
7
varassign=require('lodash.assign')
9
8
10
9
varbl=require('bl')
@@ -80,7 +79,7 @@ CollectorApi.prototype._send = function (destinationUrl, data) {
80
79
debug('sending data to trace servers: ',destinationUrl,payload)
81
80
82
81
req.on('error',function(error){
83
-
console.error('There was an error connecting to the Trace servers. Make sure your servers can reach trace-collector-api.risingstack.com')
82
+
console.error('error: [trace]','There was an error connecting to the Trace servers. Make sure your servers can reach trace-collector-api.risingstack.com')
84
83
debug('error connecting to the Trace servers',error)
85
84
})
86
85
req.write(payload)
@@ -215,7 +214,7 @@ CollectorApi.prototype.getService = function (cb) {
215
214
216
215
debug('raw response from trace servers: ',resText)
217
216
if(res.statusCode===401){
218
-
returnconsole.error(format('%s trace: error: %s',newDate(),'TRACE_API_KEY got rejected - are you sure you are using the right one?'))
217
+
returnconsole.error('error: [trace]','Trace API key is rejected - are you sure you are using the right one?')
219
218
}
220
219
if(res.statusCode>399){
221
220
returnsetTimeout(function(){
@@ -238,7 +237,7 @@ CollectorApi.prototype.getService = function (cb) {
238
237
debug('getting serviceKey with payload:',payload)
239
238
240
239
req.on('error',function(error){
241
-
console.error('There was an error connecting to the Trace servers. Make sure your servers can reach trace-collector-api.risingstack.com')
240
+
console.error('error: [trace]','There was an error connecting to the Trace servers. Make sure your servers can reach trace-collector-api.risingstack.com')
242
241
debug('error connecting to the Trace servers',error)
0 commit comments