File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ CollectorApi.prototype._send = function (destinationUrl, data) {
7777 } )
7878
7979 debug ( 'sending data to trace servers: ' , destinationUrl , payload )
80+ req . on ( 'error' , function ( error ) {
81+ console . error ( 'There was an error connecting to the Trace servers. Make sure your servers can reach trace-collector-api.risingstack.com' )
82+ debug ( 'error connecting to the Trace servers' , error )
83+ } )
8084 req . write ( payload )
8185 req . end ( )
8286}
@@ -221,6 +225,10 @@ CollectorApi.prototype.getService = function (cb) {
221225
222226 debug ( 'getting serviceKey with payload:' , payload )
223227
228+ req . on ( 'error' , function ( error ) {
229+ console . error ( 'There was an error connecting to the Trace servers. Make sure your servers can reach trace-collector-api.risingstack.com' )
230+ debug ( 'error connecting to the Trace servers' , error )
231+ } )
224232 req . write ( payload )
225233 req . end ( )
226234}
You can’t perform that action at this time.
0 commit comments