API Reference

All Sophonz SDK APIs across platforms, in one place.

Every Sophonz SDK API across platforms, gathered in one place. Each entry links to the detailed reference in the relevant SDK docs.

Browser SDK

See the full Browser SDK API reference.

Android SDK

See the full API in the Android SDK API reference.

  • Sophonz.start(context) — Starts the SDK
  • setUserIdentifier, addUserPersona, addUserSessionProperty — users and sessions
  • logInfo, logException, addBreadcrumb — logs and exceptions
  • startSpan, recordSpan, recordCompletedSpan — spans
  • addSpanExporter, setResourceAttribute — OpenTelemetry extension

The collector URL and app key live in sophonz-config.json, not in code. See Configuration.

iOS SDK

See the full API in the iOS SDK API reference.

  • Sophonz.start(options:) — Starts the SDK; configuration and start are a single step, not setup then start
  • userIdentifier, addPersona, setProperty — users and sessions
  • log, addBreadcrumb, appendCrashInfo — logs and crashes
  • createSpan, createStartupChildSpan — spans
  • sophonzTrace(_:) — SwiftUI screens
  • Sophonz.setUserId(id:) · Sophonz.getUserId() — Set/get the user ID
  • Sophonz.customLog(level:message:) — Send a custom log
  • Sophonz.setAttribute(key:value:) — Add a custom attribute to a span
  • Sophonz.getDeviceId() — Get the device UUID
  • Sophonz.setWebviewConfiguration(userContentController:) — Manually inject the xib WebView script

Backend SDKs

Backend SDKs, including Node.js, are in preparation. Check progress in the backend SDK docs.