Interface IChannelConfiguration

The IChannelConfiguration interface holds the configuration details passed to Post module.

Hierarchy

  • IChannelConfiguration

Properties

addNoResponse?: boolean

[Optional] flag to indicate whether the sendBeacon and fetch (with keep-alive flag) should add the "NoResponseBody" query string value to indicate that the server should return a 204 for successful requests. Defaults to true

alwaysUseXhrOverride?: boolean

[Optional] By default during unload (or when you specify to use sendBeacon() or sync fetch (with keep-alive) for an event) the SDK ignores any provided httpXhrOverride and attempts to use sendBeacon() or fetch(with keep-alive) when they are available. When this configuration option is true any provided httpXhrOverride will always be used, so any provided httpXhrOverride will also need to "handle" the synchronous unload scenario.

autoFlushEventsLimit?: number

[Optional] If defined, when the number of queued events reaches or exceeded this limit this will cause the queue to be immediately flushed rather than waiting for the normal timers. Defaults to undefined.

avoidOptions?: boolean

[Optional] Avoid adding request headers to the outgoing request that would cause a pre-flight (OPTIONS) request to be sent for each request. This currently defaults to false. This is changed as the collector enables Access-Control-Max-Age to allow the browser to better cache any previous OPTIONS response. Hence, we moved some of the current dynamic values sent on the query string to a header.

clearTimeoutOverride?: {
    (id): void;
    (timeoutId): void;
}

Type declaration

    • (id): void
    • Override for clearTimeout

      Parameters

      • id: number

      Returns void

    • (timeoutId): void
    • Override for clearTimeout

      Parameters

      • timeoutId: string | number | Timeout

      Returns void

disableAutoBatchFlushLimit?: boolean

[Optional] If defined allows you to disable the auto batch (iKey set of requests) flushing logic. This is in addition to the default transmission profile timers, autoFlushEventsLimit and eventsLimitInMem config values.

disableEventTimings?: boolean

[Optional] By default additional timing metrics details are added to each event after they are sent to allow you to review how long it took to create serialized request. As not all implementations require this level of detail and it's now possible to get the same metrics via the IPerfManager and IPerfEvent we are enabling these details to be disabled. Default value is false to retain the previous behavior, if you are not using these metrics and performance is a concern then it is recommended to set this value to true.

disableFetchKeepAlive?: boolean

[Optional] A flag to disable the usage of the fetch with keep-alive support.

disableOptimizeObj?: boolean

[Optional] Switch to disable the v8 optimizeObject() calls used to provide better serialization performance. Defaults to false.

disableTelemetry?: boolean

The master off switch. Do not send any data if set to TRUE

disableXhrSync?: boolean

[Optional] When using Xhr for sending requests disable sending as synchronous during unload or synchronous flush. You should enable this feature for IE (when there is no sendBeacon() or fetch (with keep-alive)) and you have clients that end up blocking the UI during page unloading. This will cause ALL XHR requests to be sent asynchronously which during page unload may result in the lose of telemetry.

enableCompoundKey?: boolean

[Optional] Enables support for objects with compound keys which indirectly represent an object where the "key" of the object contains a "." as part of it's name.

Example

event: { "somedata.embeddedvalue": 123 }
eventsLimitInMem?: number

[Optional] The number of events that can be kept in memory before the SDK starts to drop events. By default, this is 10,000.

excludeCsMetaData?: boolean

:warning: DO NOT USE THIS FLAG UNLESS YOU KNOW THAT PII DATA WILL NEVER BE INCLUDED IN THE EVENT!

[Optional] Flag to indicate whether the SDK should include the common schema metadata in the payload. Defaults to true. This flag is only applicable to the POST channel and will cause the SDK to exclude the common schema metadata from the payload, while this will reduce the size of the payload, also means that the data marked as PII will not be processed as PII by the backend and will not be included in the PII data purge process.

Since

4.1.0

httpXHROverride?: IXHROverride

[Optional] The HTTP override that should be used to send requests, as an IXHROverride object. By default during the unload of a page or if the event specifies that it wants to use sendBeacon() or sync fetch (with keep-alive), this override will NOT be called. You can now change this behavior by enabling the 'alwaysUseXhrOverride' configuration value. The payload data (first argument) now also includes any configured 'timeout' (defaults to undefined) and whether you should avoid creating any synchronous XHR requests 'disableXhrSync' (defaults to false/undefined)

ignoreMc1Ms0CookieProcessing?: boolean

MC1 and MS0 cookies will not be returned from Collector endpoint.

immediateEventLimit?: number

[Optional] Sets the maximum number of immediate latency events that will be cached in memory before the SDK starts to drop other immediate events only, does not drop normal and real time latency events as immediate events have their own internal queue. Under normal situations immediate events are scheduled to be sent in the next Javascript execution cycle, so the typically number of immediate events is small (~1), the only time more than one event may be present is when the channel is paused or immediate send is disabled (via manual transmit profile). By default max number of events is 500 and the default transmit time is 0ms.

maxEventRetryAttempts?: number

[Optional] Identifies the number of times any single event will be retried if it receives a failed (retirable) response, this causes the event to be internally "requeued" and resent in the next batch. As each normal batched send request is retried at least once before starting to increase the internal backoff send interval, normally batched events will generally be attempted the next nearest even number of times. This means that the total number of actual send attempts will almost always be even (setting to 5 will cause 6 requests), unless using manual synchronous flushing (calling flush(false)) which is not subject to request level retry attempts. Defaults to 6 times.

maxUnloadEventRetryAttempts?: number

[Optional] Identifies the number of times any single event will be retried if it receives a failed (retriable) response as part of processing / flushing events once a page unload state has been detected, this causes the event to be internally "requeued" and resent in the next batch, which during page unload. Unlike the normal batching process, send requests are never retried, so the value listed here is always the maximum number of attempts for any single event. Defaults to 2 times. Notes: The SDK by default will use the sendBeacon() API if it exists which is treated as a fire and forget successful response, so for environments that support or supply this API the events won't be retried (because they will be deeded to be successfully sent). When an environment (IE) doesn't support sendBeacon(), this will cause multiple synchronous (by default) XMLHttpRequests to be sent, which will block the UI until a response is received. You can disable ALL synchronous XHR requests by setting the 'disableXhrSync' configuration setting and/or changing this value to 0 or 1.

overrideEndpointUrl?: string

Override for Endpoint where telemetry data is sent

overrideInstrumentationKey?: string

Override for Instrumentation key

payloadListener?: PayloadListenerFunction

[Optional] POST channel listener function, used for enabling logging or reporting (RemoteDDVChannel) of the payload that is being sent.

payloadPreprocessor?: PayloadPreprocessorFunction

[Optional] POST channel preprocessing function. Can be used to gzip the payload before transmission and to set the appropriate Content-Encoding header. The preprocessor is explicitly not called during teardown when using the sendBeacon() API.

setTimeoutOverride?: typeof setTimeout

Override for setTimeout

stringifyObjects?: boolean

[Optional] During serialization, when an object is identified, should the object be serialized by JSON.stringify(theObject); (when true) otherwise by theObject.toString(). Defaults to false

transports?: number | number[]

[Optional] Either an array or single value identifying the requested TransportType type that should be used. This is used during initialization to identify the requested send transport, it will be ignored if a httpXHROverride is provided.

unloadTransports?: number | number[]

[Optional] Either an array or single value identifying the requested TransportType type(s) that should be used during unload or events marked as sendBeacon. This is used during initialization to identify the requested send transport, it will be ignored if a httpXHROverride is provided and alwaysUseXhrOverride is true.

useSendBeacon?: boolean

[Optional] A flag to enable or disable the usage of the sendBeacon() API (if available). If running on ReactNative this defaults to false for all other cases it defaults to true.

valueSanitizer?: IValueSanitizer

[Optional] The value sanitizer to use while constructing the envelope.

xhrTimeout?: number

[Optional] Specify a timeout (in ms) to apply to requests when sending requests using XHR, XDR or fetch requests. Defaults to undefined and therefore the runtime defaults (normally zero for browser environments)

Generated using TypeDoc