EmitterConfiguration

open class EmitterConfiguration : Configuration, EmitterConfigurationInterface

Configure how the tracker should send the events to the collector.

Default values:

  • bufferOption: BufferOption.Single

  • serverAnonymisation: false

  • emitRange: 25 - maximum number of events to process at a time

  • threadPoolSize: 15

  • byteLimitGet: 40000 bytes

  • byteLimitPost: 40000 bytes

  • retryFailedRequests: true

Constructors

Link copied to clipboard
constructor(jsonObject: JSONObject)

This constructor is used in remote configuration.

constructor()

Functions

Link copied to clipboard

How many events to send in each request. By default, this is set to BufferOption.Single.

Link copied to clipboard

Maximum amount of bytes allowed to be sent in a payload in a GET request.

Link copied to clipboard

Maximum amount of bytes allowed to be sent in a payload in a POST request.

Link copied to clipboard
open override fun copy(): EmitterConfiguration
Link copied to clipboard
fun customRetryForStatusCodes(customRetryForStatusCodes: Map<Int, Boolean>?): EmitterConfiguration

Custom retry rules for HTTP status codes returned from the collector. The dictionary is a mapping of integers (status codes) to booleans (true for retry and false for not retry). By default, events in requests that return codes 400, 401, 403, 410, or 422 are not retried and are deleted from the EventStore.

Link copied to clipboard

Maximum number of events collected from the EventStore to be processed into requests at one time. The number of events per request is set using EmitterConfiguration.bufferOption.

Link copied to clipboard

Custom component with full ownership for persisting events before to be sent to the collector. If it's not set the tracker will use a SQLite database as default EventStore.

Link copied to clipboard

Limit for the maximum duration of how long events should be kept in the event store if they fail to be sent. Defaults to 30 days.

Link copied to clipboard

Limit for the maximum number of unsent events to keep in the event store. Defaults to 1000.

Link copied to clipboard

Callback called for each request performed by the tracker to the event collector.

Link copied to clipboard

Whether to retry failed requests. By default, this is set to true.

Link copied to clipboard

Whether to anonymise server-side user identifiers including the network_userid and user_ipaddress

Link copied to clipboard

Maximum number of threads working in parallel in the tracker to send requests.

Properties

Link copied to clipboard
open override var bufferOption: BufferOption

Whether the buffer should send events instantly or after the buffer has reached it's limit. By default, this is set to BufferOption Default.

Link copied to clipboard
open override var byteLimitGet: Long

Maximum amount of bytes allowed to be sent in a payload in a GET request.

Link copied to clipboard
open override var byteLimitPost: Long

Maximum amount of bytes allowed to be sent in a payload in a POST request.

Link copied to clipboard

Custom retry rules for HTTP status codes returned from the Collector. The dictionary is a mapping of integers (status codes) to booleans (true for retry and false for not retry).

Link copied to clipboard
open override var emitRange: Int

Maximum number of events collected from the EventStore to be sent in a request.

Link copied to clipboard
open override var eventStore: EventStore?

Custom component with full ownership for persisting events before to be sent to the collector. If it's not set the tracker will use a SQLite database as default EventStore.

Link copied to clipboard
open override var maxEventStoreAge: Duration

Limit for the maximum duration of how long events should be kept in the event store if they fail to be sent. Defaults to 30 days.

Link copied to clipboard
open override var maxEventStoreSize: Long

Limit for the maximum number of unsent events to keep in the event store. Defaults to 1000.

Link copied to clipboard
open override var requestCallback: RequestCallback?

Callback called for each request performed by the tracker to the collector.

Link copied to clipboard
open override var retryFailedRequests: Boolean

Whether to retry sending events that failed to be sent to the collector.

Link copied to clipboard
open override var serverAnonymisation: Boolean

Whether to anonymise server-side user identifiers including the network_userid and user_ipaddress

Link copied to clipboard
open override var threadPoolSize: Int

Maximum number of threads working in parallel in the tracker to send requests.