---
title: "Client Tracing: Understanding Mobile and Desktop Application Performance at Scale"
description: "Slack extended its backend distributed tracing to iOS, Android and JavaScript clients so engineers could pinpoint why client actions like channel switches are slow."
url: "https://swe.quest/articles/client-tracing-understanding-mobile-and-desktop-application-performance-at-scale-21a4a4d3c10c520b"
canonical: "https://slack.engineering/client-tracing-understanding-mobile-and-desktop-application-performance-at-scale/"
source: "Slack Engineering"
published: "2021-03-24"
difficulty: "medium"
kind: "Case study"
reading_minutes: 17
tags: ["observability","mobile","performance","sqlite"]
---

# Client Tracing: Understanding Mobile and Desktop Application Performance at Scale

A post on [Slack Engineering](https://swe.quest/sources/slack.md), published 2021-03-24, 17 min read, Case study. Original: [https://slack.engineering/client-tracing-understanding-mobile-and-desktop-application-performance-at-scale/](https://slack.engineering/client-tracing-understanding-mobile-and-desktop-application-performance-at-scale/)

## Summary

Slack extended its backend distributed tracing to iOS, Android and JavaScript clients so engineers could pinpoint why client actions like channel switches are slow. API calls are broken into queue, HTTP request and parse spans, with trace IDs propagated in HTTP headers to join client and server spans. SQLite access is split into wait, execute and save spans, and a general view-load trace schema covers cache-then-network screens. Slack built its own Swift/Kotlin/JS tracing API instead of OpenTracing because thread-local context breaks on highly concurrent mobile code. The API passes an explicit TraceContext, samples traces (1% of API requests), and flushes open traces when the app is backgrounded.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Mobile](https://swe.quest/tags/mobile.md) (Web & mobile)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [SQLite](https://swe.quest/tags/sqlite.md) (Data & databases)

## Prerequisites

- distributed tracing basics ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))
- mobile app concurrency ([easy posts on Mobile](https://swe.quest/tags/mobile.md?difficulty=easy))

## Keywords

Slack, Honeycomb, OpenTracing, Swift, SQLite

## Related posts

- [Tracing Notifications](https://swe.quest/articles/tracing-notifications-050fff7612252fe6.md): Slack Engineering · 2023-04-04 · Medium · 10 min read · Observability, Communications, Distributed systems, Analytics & OLAP
  Slack models every notification as its own distributed trace, using the notification\_id as the trace\_id and span links back to the sender's message trace, so notification flows can be sampled at 100% while ordinary backend requests stay at 1%.
- [OpenTelemetry for JavaScript Observability at Zalando](https://swe.quest/articles/opentelemetry-for-javascript-observability-at-zalando-001cdd3c281fae3c.md): Zalando Engineering · 2024-07-28 · Medium · 11 min read · Observability, JavaScript, Frontend, Web performance
  Zalando built thin OpenTelemetry-based observability SDKs for Node.js and the browser, sharing a common API package so isomorphic apps can be instrumented consistently.
- [Swift at scale: building the TelemetryDeck analytics service](https://swe.quest/articles/swift-at-scale-building-the-telemetrydeck-analytics-service-0f65fbef9503707f.md): Swift.org · 2026-03-06 · Medium · 7 min read · Swift, API design, Analytics & OLAP
  TelemetryDeck runs its privacy-focused app analytics service, covering over 16 million users a month, on Swift and Vapor in Kubernetes, with Postgres for metadata and Apache Druid for analytics data.
- [Scaling Slack’s Mobile Codebases: Modernization](https://swe.quest/articles/scaling-slack-s-mobile-codebases-modernization-950b9c539d5b5770.md): Slack Engineering · 2022-05-04 · Medium · 12 min read · Mobile, Refactoring & migrations, Swift, Java & JVM, Build systems
  Slack's year-and-a-half Duplo initiative concluded by modernizing its iOS and Android codebases: iOS moved to a custom VIPER-style feature architecture, stricter SwiftLint rules banning singletons and NotificationCenter, Combine (via CombineX until iOS 12 was dropped), and broader SlackKit adoption, while Android replaced Gson with Moshi, Android Priority Job Queue with WorkManager, and handwritten API calls with an internal Retrofit-based library, and introduced coroutines and Compose incrementally. iOS ended 68% modernized and 81% modularized with CI stability rising from 77% to 90% and average time-to-merge down 64%, Android reached 92% modularization, and local builds later dropped nearly 50% with Bazel and M1 Macs.
- [Scaling Slack’s Mobile Codebases: Modularization](https://swe.quest/articles/scaling-slack-s-mobile-codebases-modularization-70662aadd976d6a5.md): Slack Engineering · 2022-03-28 · Medium · 11 min read · Mobile, Build systems, Refactoring & migrations, Developer productivity, Swift
  Slack split its monolithic iOS and Android app targets into owned Feature, Service and Library modules with strict linking rules, such as interface/implementation pairs on iOS, to cut build times, untangle dependencies and clarify code ownership.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
