Skip to content

Logging and observability

Observability should answer whether the SDK was created, whether the supervisor started, whether it became online, why it disconnected, and whether the application released it correctly.

FieldExampleNotes
sdk_version1.0.0Always record
platformandroidUse the wrapper platform, not marketing category
os_versionAndroid 15Avoid device serials
architecturearm64-v8aUseful for native loading issues
lifecycle_eventconnectedCreate, supervisor-started, connected, disconnected, closed
disconnect_reasonNetworkStable public reason
error_codeNumeric or wrapper enumPrefer structured value
retryabletrueCopy from the SDK error model
background_modeenabledPlatform configuration only
  • Full application API keys.
  • Consent receipts or consent-window callback URLs.
  • Runtime tokens or internal service responses.
  • Private signing material.
  • Registry authentication tokens.
  • User personal content or custom device identity seeds.

If correlation is necessary, use an application-owned non-reversible identifier approved by your privacy and security teams. Do not invent a hash of sensitive SDK material.

Useful lifecycle order looks like:

consent.accepted
sdk.created
sdk.supervisor_started
sdk.connected
sdk.disconnected reason=Network retryable=true
sdk.connected
sdk.closed

Do not emit connected immediately after connect() returns. That produces misleading uptime and reward metrics.

  • Android debug output uses logcat SDK tags.
  • iOS wrapper errors and callbacks should be routed into the application's logging abstraction.
  • Node/Electron events run on the JavaScript event loop; avoid dumping error objects that contain configuration.
  • .NET should contain callback exceptions and log typed SDK errors.
  • C consumers must copy the last-error string immediately, then sanitize it before storage.

Debug mode may increase detail and should be disabled by default. Enable it only for a bounded diagnostic session requested by support, then reproduce, collect sanitized output, and disable it again.