Mxpanel.Batcher.start_link
start_link
, go back to Mxpanel.Batcher module for more information.
Starts a Mxpanel.Batcher
linked to the current process.
Supported options
:name
- Required. Name of the batcher instance.:token
- Required. The Mixpanel token associated with your project.:base_url
- Mixpanel API URL The default value is"https://api.mixpanel.com"
.:http_client
- HTTP client used by the Batcher The default value is{Mxpanel.HTTPClient.FinchAdapter, [name: Mxpanel.HTTPClient]}
.:pool_size
- The size of the pool of event buffers. The default value is10
.:flush_interval
- Interval in milliseconds which the event buffer are processed. The default value is5000
.:flush_jitter
- Jitter the flush interval by a random amount. Value in milliseconds. This is primarily to avoid large write spikes. For example, aflush_jitter
of 1s andflush_interval
of 1s means flushes will happen every 5-6s. The default value is1000
.:retry_max_attempts
- Max attempts that a batch of events should be tried before giving up. The default value is3
.:retry_base_backoff
- Base time in milliseconds to calculate the wait time between retry attempts. Formula:(attempt * retry_base_backoff) + random(1..retry_base_backoff)
. The default value is100
.:import_timeout
- The maximum amount of time in milliseconds each batch of events is allowed to execute for. The default value is30000
.:telemetry_buffers_info_interval
- Interval in milliseconds thetelemetry
with the buffers info is published. The default value is30000
.