Sentry integration in the Stonly Mobile SDK

1. Overview

Stonly Mobile SDK ships with an embedded Sentry client.

Sentry is an industry standard observability tool that we use internally to monitor the SDK itself. NOT your application code. It lets us:

  • monitor SDK stability in production environments,

  • automatically detect crashes, exceptions, and unhandled errors originating from SDK code,

  • react faster to issues,

  • collect performance metrics (e.g. cold-start impact, render time of guides, network latency) so we can optimize future versions.

Sentry runs in an isolated, sandboxed configuration dedicated to the Stonly SDK. It does not interfere with your own Sentry instance if you also use Sentry in your app.


2. What is collected

The SDK reports only events that originate inside the Stonly SDK. Specifically:

  • Errors and crashes caught within the SDK boundary (stack traces, SDK version, OS version, device model).

  • Performance traces for SDK operations (e.g. guide load time, network calls to Stonly backend).

  • Anonymous technical metadata: SDK version, platform, OS version, device class.

The SDK does not send:

  • your app's source code, screen content, or screenshots,

  • end-user PII (names, emails, etc.),

  • application-level errors that happen outside SDK code.

3. Default behavior

Sentry monitoring is enabled by default when you initialize the SDK. No additional configuration is required to benefit from it.

If your privacy or compliance requirements forbid third-party telemetry, you can opt out at any time using the API described below.

4. Opting out

The SDK exposes a dedicated method to disable Sentry monitoring. Call it before Stonly.Widget.widgetId to make sure no event is captured during startup.

iOS (Obj C)
@import Stonly;
//...
StonlyWidget.sentryEnabled = false;// Disable Sentry monitoring before initialization 

StonlyWidget.widgetId = @"<WIDGET_ID>";// Initialize the SDK as usual 
iOS (Swift)
import Stonly
//...
Stonly.Widget.isSentryEnabled = false // Disable Sentry monitoring before initialization 
Stonly.Widget.widgetId = "<WIDGET_ID>"// Initialize the SDK as usual 
Android (Kotlin/Java)
import com.stonly.sdk.Stonly 
//...
Stonly.setSentryEnabled(false)   // Disable Sentry monitoring before initialization 
Stonly.setWidgetId("YOUR_WIDGET_ID",application,uiType,datacenter)// Initialize the SDK as usual 

4. Privacy & compliance

  • The Sentry instance used by the SDK is owned and operated by Stonly.

  • Data is processed in line with our Privacy Policy.

  • The SDK does not capture personal data of your end users by design.

  • If you have a strict no-telemetry policy, use the opt-out flow above and document the change in your release notes.

5. FAQ

Q: Will this conflict with my own Sentry SDK?

No. Stonly's Sentry client is isolated and uses its own DSN; it will not intercept or duplicate events from your application's Sentry instance.

Q: Does enabling Sentry impact app performance?

The overhead is minimal. Sentry is configured with conservative sampling for performance traces and only reports on SDK-scoped events.

Q: Can I review what is being sent?

No. For security reasons, the contents of events emitted by the embedded Sentry client are not exposed for inspection by the host application.

Q: Is opt-out persisted between sessions?

Yes. The opt-out works by setting a configuration flag in the SDK. As long as you set it (e.g. before each Stonly.setWidgetId call in your app's startup code), Sentry monitoring will remain disabled in every session.

Q: Does opt-out also disable other SDK telemetry?

The flag controls Sentry-based stability and performance monitoring only. Functional analytics (e.g. guide views) are governed by your existing Stonly configuration.