Bump default capacity in a client
I suspect that depending on the go scheduler's moods, our internal
flushing already drops spans on the client. This should give it a bit
of breathing room to put something on the client's submission queue
even if that goroutine didn't get scheduled in a while.
@@ -143,7 +143,7 @@ func NewClient(addrStr string, opts ...ClientParam) (*Client, error) {
}
params := cl.backend.params()
params.addr = addr
- params.cap = 1
+ params.cap = DefaultCapacity
for _, opt := range opts {
if err = opt(cl); err != nil {
return nil, err
@@ -165,6 +165,10 @@ func NewClient(addrStr string, opts ...ClientParam) (*Client, error) {
// other goroutines that use the DefaultClient.
var DefaultClient *Client
+// DefaultCapacity is the capacity of the span submission queue in a
+// veneur client.
+const DefaultCapacity = 64
+
// DefaultVeneurAddress is the address that a reasonable veneur should
// listen on. Currently it defaults to UDP port 8128.
const DefaultVeneurAddress string = "udp://127.0.0.1:8128"
