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
{{ message }}
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
this code is from https://github.com/uber/jaeger-client-node/blob/master/src/reporters/udp_sender.js
when high concurrency, spans may be dropped frequently:
here is a example:
this._maxSpanBytes: 64696
a span lenth: 639
current _byteBufferSize: 64671
now run append(span)
at
comment 1
: this._byteBufferSize will be64671+639=65310
, it's bigger thanthis._maxSpanBytes
so it will run
comment 2
:this.flush()
but in
this.flush()
:comment 4
usethis._byteBufferSize
, which now is 65310, which will cause "EMSGSIZE" error, if you add a send callback:and the 64671 byte span is dropped!
fix :
add
this._byteBufferSize -= spanSize;
beforecomment 2
.or maybe reconstruct it
this._byteBufferSize += spanSize;
andthis._batch.spans.push(span);
should be atomic, but the code separated them.The text was updated successfully, but these errors were encountered: