Product Benefits Pricing Guides Docs About Contact us Try it out
Performance

Sentry Cocoa Connection Type: Network Context

Sentry Cocoa 9.30 adds connection_type to device context. Learn mobile error tracking by Wi-Fi and cellular network technology.

· 3 min read

Sentry’s Cocoa SDK 9.30.0, released on 30 September, adds connection_type to the device context on every event. On iOS, cellular connections also report the network technology in use. A follow-up, 9.30.2 on 14 October, fixed two crashes related to reading cellular network details and URLSession tasks, so it is the safer version to adopt.

Why it matters: many app problems that look like bugs are really network problems. Timeouts, slow screens and failed uploads often cluster on weak cellular links. Without connection data on each error, you cannot tell whether a spike is a code defect or a coverage problem.

What Goes Wrong Without It

An error rate rises on a checkout screen. The team spends days reading stack traces, only to find the failures come from users on slow cellular connections where a request exceeds its timeout. Without network context, there was no quick way to see that.

Data Points to Track

  • connection_type: Wi-Fi, cellular or none, as reported in the device context
  • cellular_network_technology: the radio technology on cellular, where available
  • error_type and error_message: what failed
  • screen_name: where the user was
  • request_host: the endpoint involved, without personal data
  • request_duration_ms: to compare with your timeout
  • release and sdk_version: to compare builds
  • session_id: to count affected sessions, not just events

Setup Steps

  1. Update Sentry Cocoa to 9.30.2 or later, so you get the new context and the stability fixes.
  2. Open a recent event in Sentry and confirm that connection_type appears in the device context.
  3. Create a saved search that groups errors by connection_type, and another that filters to cellular only.
  4. Add network request spans or breadcrumbs, so slow calls appear next to errors.
  5. Tag your own events, such as checkout_failed, with the same connection field so product analytics and error data can be joined.
  6. Set an alert for cellular error rate on your most important screens.
  7. Review the data against your privacy notice, as network type is device information.

Actionable Insights

Compare error rates by connection. If cellular sessions fail at several times the Wi-Fi rate, test with throttled networks before changing logic.

Tune timeouts and retries. If failures cluster on slower technologies, longer timeouts, smaller payloads or a retry with backoff may remove most of the problem.

Prioritise by affected sessions. An error that mostly hits users on weak links may matter less than one on every connection type. Rank by session impact.

Plan for offline. A rising share of none states around key actions is a sign that a queue or offline mode could protect conversions.

Keeping the Data Trustworthy

Connection type describes the moment an event was captured, not the whole session. A user can start on Wi-Fi, walk outside and finish on cellular. Where it matters, record the connection type at the start of the failing action as well, so you are not blaming the wrong network. Also remember that older app builds will not send the new field, so filter by release when you compare before and after.