opencensus-node
opencensus-node copied to clipboard
propagation causes "Error: socket hang up "
Repro
- Wire up tracing per below code snippet
- Start application & make a request
Expected
traces show up in stackdriver
Actual
no traces show up in stackdriver and the application crashes w/ the error snippet below a minute or so after receiving a few requests
of note, if I remove propagation traces DO show up in stackdriver so it's something related to the use of @opencensus/propagation-stackdriver
code snippet
const tracing = require('@opencensus/nodejs')
const stackdriverKeyFile = require('/stackdriverKeyFile.json')
const propagation = require('@opencensus/propagation-stackdriver')
const exporter = require('@opencensus/exporter-stackdriver')
tracing.start({
exporter: new exporter.StackdriverTraceExporter({
projectId: stackdriverKeyFile.project_id
}),
logLevel: 4,
propagation: propagation.v1
})
error snippet
Error: socket hang up
at createHangUpError (_http_client.js:335:15)
at TLSSocket.socketOnEnd (_http_client.js:428:23)
at TLSSocket.emit (events.js:185:15)
at endReadableNT (_stream_readable.js:1101:12)
at process._tickCallback (internal/process/next_tick.js:114:19)
Emitted 'error' event at:
at TLSSocket.socketOnEnd (_http_client.js:428:9)
at TLSSocket.emit (events.js:185:15)
at endReadableNT (_stream_readable.js:1101:12)
at process._tickCallback (internal/process/next_tick.js:114:19)
Interesting, I just tried using require('@opencensus/propagation-b3')
and it has the same behavior so it appears the issue does not lie with '@opencensus/propagation-stackdriver'
I also get this error when using @opencensus/exporter-stackdriver
but not when using the @opencensus/exporter-jaeger
so my guess is that is has something to do with the stackdriver exporter.
@antonj do you get the same error if you use the @opencensus/exporter-jaeger
and set the sampling rate to 0
?
I am pretty sure that this issue is related to #119
Same situation here with require('@opencensus/propagation-b3')
.
The Error: socket hang up
is happening with node v8.12.0
.
When using node v10.12.0
the issue dissapears and traces show up in stackdriver.
blocked by https://github.com/census-instrumentation/opencensus-node/issues/158
@chrisdostert, @antonj, Could you please provide stackdriver version or try one more time with latest master?
I found another issue https://github.com/census-instrumentation/opencensus-node/issues/158 which was fixed, and I cant reproduce current in master, node v8.12.0, I checked opencensus/exporter-stackdriver
and @opencensus/propagation-b3