Skip to content

Add buffer_size and async to client arguments

Piotr Skorupa requested to merge psk-add-async-emitter-and-buffer-size into main

Related to #4 (closed) and broadly to gitlab-org/gitlab#436447 (closed)

The regular Emitter used in this SDK is blocking on requests and this can cause performance issues for multiple events sent during a Rails request.

This adds buffer_size and async as client arguments that sets the emitter's buffer size and subsititutes AsyncEmitter for the regular Emitter, respectively.

Setting the buffer_size to anything past 1 also changes the HTTP method to POST, as the Snowplow Ruby Tracker docs imply that GET doesn't support batching events at all.

Merge request reports

Loading