Configuration
Everything the SDK accepts at start-up, and how to turn individual
instrumentations off. Each option is set in the first argument to
coralogix_roku_initialize(). Only public_key, application and one of the
two region options are required.
Options
| Option | Type | Required | Description |
|---|---|---|---|
public_key | String | Yes | Your RUM public key. |
application | String | Yes | Your application name in Coralogix. |
coralogixDomain | String | Yes* | Your Coralogix region: EU1, EU2, US1, US2, US3, AP1, AP2, AP3. |
coralogixDomainUrl | String | Yes* | Your ingress URL, used instead of coralogixDomain. |
version | String | No | Your channel's version. Defaults to the version in your manifest. |
environment | String | No | For example production or staging. |
labels | Object | No | Labels added to every record. Values are strings, numbers or booleans. |
user_context | Object | No | The viewer: user_id, user_name, user_email, account_id, account_name, user_metadata. Limited to 512 characters once serialized. Change it later with setUserContext. |
sessionConfig | Object | No | { sessionSampleRate, inactivityTimeoutMinutes }. sessionSampleRate: the percentage of sessions to record, 0 to 100. Default 100. inactivityTimeoutMinutes: how long a session lasts with no activity, a whole number of minutes from 15 to 240. Default 120 (2 hours). See When a session ends. |
instrumentations | Object | No | { custom, errors, network }, all true by default. See Instrumentations. |
ignoreUrls | Array | No | Network requests not to report. See Ignore URLs. |
ignoreErrors | Array | No | Errors not to report. See Ignore errors. |
ignoredExitEvents | Array | No | Exit codes that are not crashes, such as "EXIT_SETTINGS_UPDATE", added to the defaults: EXIT_UNKNOWN, EXIT_POWER_MODE, EXIT_IDLE_AUTO_EXIT, EXIT_DIAL_DELETE, EXIT_USER_KILL, EXIT_USER_NAV. A Home press is already not a crash. |
traceParentInHeader | Object | No | { enabled, options: { allowedTracingUrls } }. enabled is false by default. See Traces. |
batchConfig | Object | No | { scheduledDelayMillis }: how often the SDK sends records, 2000 to 30000 ms. Default 2000. |
proxyUrl | String | No | Send records to your own relay. The SDK passes the Coralogix address in a cxforward query parameter. |
ignoreProxyUrlParams | Boolean | No | Send to proxyUrl without the cxforward parameter. Default false. |
debug | Boolean | No | Print SDK activity to the device console. Default false. See Troubleshooting. |
* Set one of coralogixDomain or coralogixDomainUrl.
Instrumentations
An instrumentation is one family of signals the SDK collects. Each can be turned
off on its own, and turning one off stops both the collection and the reporting
calls that belong to it. Pass false to turn one off:
| Key | Covers |
|---|---|
custom | Custom logs: reportLog and the level methods |
errors | reportError and crash reports |
network | CxUrlTransfer and reportNetworkRequest. When false, the SDK adds no traceparent header. |
coralogix_roku_initialize({
' ...
instrumentations: { network: false }
}, screen.getGlobalNode())
Last updated on