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

Amplitude Swift Network Tracking: Duplicate Fix

Amplitude Swift 1.19.4 deduplicates network listeners and tracks early requests. See what to check in your network request tracking data.

· 3 min read

Amplitude’s Swift SDK 1.19.4, released on 27 October, fixes two problems in network request tracking. Listeners are now deduplicated, so a request is not counted more than once, and requests are tracked before remote configuration arrives, so early calls at app launch are no longer missed.

Why it matters: network request events show you slow endpoints, failure rates and the cost of your launch sequence. If some requests are counted twice and the earliest ones are missing, your picture of startup performance is skewed in exactly the place users feel it most.

What Goes Wrong Without It

A team sees request counts per session rising after adding the SDK to a second module that also sets up network tracking. Error rates look higher than the backend reports. Meanwhile, the first few calls at launch, such as config and sign-in, never appear, so launch time looks faster than it is.

Data Points to Track

  • sdk_version: the Amplitude Swift version on each session
  • request_url_host and request_path: the endpoint, without personal data or query strings
  • request_method: GET, POST and so on
  • status_code: response status, to calculate failure rates
  • request_duration_ms: time from send to response
  • request_order_in_session: position of the call, so early launch calls are visible
  • seconds_since_app_launch: when the request started
  • app_version and os_version: to split by release and device

Setup Steps

  1. Check which Amplitude Swift version each of your app builds uses, including any internal frameworks that bundle their own copy.
  2. Update to 1.19.4 or later, following the Amplitude Swift release notes.
  3. Enable network tracking in the SDK configuration, and make sure it is switched on in one place only.
  4. Make a controlled test: launch the app, perform one known request, and confirm that exactly one event arrives.
  5. Check that requests made in the first second after launch appear, and that their seconds_since_app_launch values are small.
  6. Compare your backend access logs with Amplitude event counts for one endpoint over a day.
  7. Add sdk_version to your charts, and annotate the date each build reached users.

Actionable Insights

Expect a drop in request counts. If counts per session fall after the update, that may be duplicates disappearing and not a real change in behaviour. Check against backend logs before treating it as a regression.

Expect new early requests. Launch calls that were previously invisible now show up. Slow ones are your best candidates for reducing startup time.

Recalculate failure rates. Removing duplicates changes both the numerator and the denominator. Rebuild error rate charts from the update date and keep the older ones clearly labelled.

Look at the first five calls. Group by request_order_in_session and compare durations. If the first call is consistently slow, consider caching, prefetching or moving work off the launch path.

Keeping the Data Trustworthy

Network events are high volume, so small errors add up quickly. Record the SDK version on every event and keep a short note of the date each app build shipped. When a chart changes shape, you can then tell at a glance whether users changed, your backend changed, or the SDK did. It is also worth sampling a handful of sessions end to end each release, comparing the events you expect with the events that arrive.