Skip to content
TraceItX Docs
Documentation

Configuration

One config object. Everything the React SDK accepts.

Updated

<TraceItXProvider
  config={{
    apiKey: 'txx_live_…',
    appVersion: '2.4.0',
    hotkey: { binding: 'Mod+Shift+B' },
    console: { maxEntries: 100, levels: ['warn', 'error'] },
  }}
>
  <App />
</TraceItXProvider>

Core

OptionTypeDefaultWhat it does
apiKeystringRequired. Your app’s SDK key. Publishable — it only grants report submission, so shipping it in a web bundle is the intended use.
appNamestringsee belowName recorded in context.app. Nothing is detected for you — set it.
appVersionstring'0.0.0'Version recorded in context.app. Nothing is detected for you — wire it to your build.
appBuildstringExact deployed build ID or commit SHA, recorded in context.app.build on errors and user-filed reports.
disabledbooleanfalseStops capture, patching, the outbox, config fetching and crash handling. The provider still installs its styles and hotkey and can still open the reporter — it is not a full uninstall.
debugbooleanfalseInstalls the replay diagnostic seam. It does not turn on verbose console logging.
onError(err) => voidCalled when a safe-wrapped public client call fails. Not every internal async failure routes here.

Reporter trigger

OptionTypeDefaultWhat it does
hotkey.bindingstring | string[] | false'Mod+Shift+B'Shortcut that opens the reporter. false disables it, as does hotkey: false.
hotkey.captureWhileTypingbooleanfalseWhether the hotkey fires while focus is in an input or textarea.

Capture

OptionTypeDefaultWhat it does
console.maxEntriesnumber100Console ring-buffer capacity.
console.levelsstring[]all fivelog, info, warn, error, debug. Narrowing to ['warn','error'] is the cheapest way to shrink reports on a chatty app.
network.maxEntriesnumber100Network ring-buffer capacity.
sessionReplay.disabledbooleanfalseNever start the replay buffer.
networkBodies.disabledbooleanfalseNever capture request/response bodies.
crashReporting.disabledbooleanfalseSuppresses automatic error reports and captureException().
installIdentifier.disabledbooleanfalseStops this app sending its daily install identifier, which counts distinct installs toward your plan. Not retroactive, and other apps in the org still count.
redactionobjectdefault-denySee Redaction.

Unset, appName falls back to 'unknown-app' on a submitted report and 'unknown' on an unattended crash report — two placeholders on two code paths, which is its own reason to set it.

sessionReplay.disabled and networkBodies.disabled are client vetoes over a server gate: the effective state is serverEnabled && !disabled, so a client can turn those off and can never turn them on. See Server config.

crashReporting.disabled, installIdentifier.disabled and redaction have no server gate — they are plain local settings.

Replies

OptionTypeDefaultWhat it does
replies.disabledbooleanfalseNo polling, no UI, no reply token on submit.
replies.ui'default' | 'headless''default'headless renders no reply UI — you consume threads and unreadCount from useTraceItX() and build your own.
replies.pollIntervalMsnumber60 000Poll cadence. Floored to 60 s regardless of what you pass.

Browser specifics

OptionTypeDefaultWhat it does
cspNoncestringThreaded into the screenshot library and injected styles. Required under a strict CSP, or the reporter renders unstyled.
themeReporterThemeReporter colours, paid plans only. See Branding.

__traceitxShadowDom is on the shared WebTraceItXConfig type but is read only by the Web SDK’s init(). The React provider always renders the reporter into document.body, so setting it here has no effect.

Provider props

config is frozen at mount — to change it, remount the provider. The one other prop, identity, is live: it points the SDK at your identity endpoint and re-mints when your user changes. See Identity.

Runtime methods

Config is set once; these are called whenever.

const { open, setUser, setIdentityToken, setExtra, addBreadcrumb, threads, unreadCount, kill } =
  useTraceItX();
MethodWhat it does
open()Opens the reporter. Resolves with { status }submitted, queued or cancelled.
setUser(user)Attach or clear the end user on future reports. See Identity.
setIdentityToken(source)Supply a verified identity by hand. The identity prop does this for you.
setExtra(value)Free-form string on the next report. Each call replaces the last. Capped — see Errors & limits.
addBreadcrumb(input)Add a custom entry to the trail. See Breadcrumbs.
markSensitive()On the hook for cross-SDK parity, but a no-op on the web. Use <Sensitive> or data-traceitx-sensitive.
threadsThe two-way replies API, for headless UIs. See Two-way replies.
unreadCountLive unread reply count across threads.
kill()Tear capture down early. The provider calls it on unmount.

open and addBreadcrumb are also exported at module level for code outside the tree. open rejects with TraceItXNotMountedError when no provider is mounted; addBreadcrumb is a silent no-op.

Precedence

Three things can set the same value. Highest wins:

  1. Server config — plan entitlements and per-app settings from GET /api/config
  2. This config object
  3. SDK defaults

With one asymmetry: for the gated features above, local config can only ever subtract. That is deliberate — a customer can disable capture for privacy reasons without being able to enable something their plan does not include.