---
title: "Swift at scale: building the TelemetryDeck analytics service"
description: "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."
url: "https://swe.quest/articles/swift-at-scale-building-the-telemetrydeck-analytics-service-0f65fbef9503707f"
canonical: "https://www.swift.org/blog/building-privacy-first-analytics-with-swift/"
source: "Swift.org"
published: "2026-03-06"
difficulty: "medium"
kind: "Case study"
reading_minutes: 7
tags: ["swift","api-design","analytics"]
---

# Swift at scale: building the TelemetryDeck analytics service

A post on [Swift.org](https://swe.quest/sources/swift.md), published 2026-03-06, 7 min read, Case study. Original: [https://www.swift.org/blog/building-privacy-first-analytics-with-swift/](https://www.swift.org/blog/building-privacy-first-analytics-with-swift/)

## Summary

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. Codable gives type-safe JSON parsing and validation. The team moved away from a shared client/server DTO package because API versioning made shared structs brittle, and now keeps DTOs inline in their controllers. Practical lessons include versioning API URLs from day one, leaning on Vapor's queues, migrations and Fluent, setting TTLs on every Redis cache entry, and adding error and performance monitoring with Swift Distributed Tracing, since the database and storage layers, not Swift, are usually the bottleneck.

Written by swe.quest, not by the author.

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

## Topics

- [Swift](https://swe.quest/tags/swift.md) (Languages)
- [API design](https://swe.quest/tags/api-design.md) (Backend & APIs)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)

## Prerequisites

- Swift basics ([easy posts on Swift](https://swe.quest/tags/swift.md?difficulty=easy))
- REST API design ([easy posts on API design](https://swe.quest/tags/api-design.md?difficulty=easy))

## Keywords

TelemetryDeck, Vapor, Codable, Apache Druid, Fluent, Swift Distributed Tracing, StripeKit, Kubernetes

## Related posts

- [Client Tracing: Understanding Mobile and Desktop Application Performance at Scale](https://swe.quest/articles/client-tracing-understanding-mobile-and-desktop-application-performance-at-scale-21a4a4d3c10c520b.md): Slack Engineering · 2021-03-24 · Medium · 17 min read · Observability, Mobile, Performance engineering, SQLite
  Slack extended its backend distributed tracing to iOS, Android and JavaScript clients so engineers could pinpoint why client actions like channel switches are slow.
- [How we brought Datadog’s data visualization to iOS: A focus on performance](https://swe.quest/articles/how-we-brought-datadog-s-data-visualization-to-ios-a-focus-on-performance-32d8e749b08067ee.md): Datadog Engineering · 2024-04-18 · Medium · 15 min read · Swift, Mobile, Performance engineering, Frontend
  Datadog built DogGraphs, an internal SwiftUI graphing library constrained to iOS 14 (no Canvas), with a result-builder API that type-checks graph compositions at compile time.
- [How Meta enables de-identified authentication at scale](https://swe.quest/articles/how-meta-enables-de-identified-authentication-at-scale-aba1c4d5d1b717ac.md): Meta Engineering · 2022-03-30 · Medium · 8 min read · Privacy, Cryptography, Identity & auth, Multi-tenancy, Scaling
  Meta's Anonymous Credential Service (ACS) authenticates clients without user IDs by splitting authentication into token issuance over an authenticated channel and unlinkable token redemption over an anonymous channel, built on VOPRFs and blind signatures with an HMAC over business data keyed by a shared secret.
- [Lessons From Building iOS Widgets](https://swe.quest/articles/lessons-from-building-ios-widgets-87bd1407ab4fa628.md): Shopify Engineering · 2022-09-22 · Medium · 23 min read · Mobile, Swift, Caching, Product engineering
  Shopify rebuilt its iOS analytics widgets natively in SwiftUI rather than React Native, because app extensions have tight memory limits, WidgetKit serializes SwiftUI view hierarchies, and React Native had no official widget support.
- [Sentry's Flutter SDK 10.0: Streaming Traces and More Accurate Crash-Free Rates](https://swe.quest/articles/sentry-s-flutter-sdk-10-0-streaming-traces-and-more-accurate-crash-free-rates-a06a0e8843447c28.md): Sentry · 2026-10-14 · Medium · 3 min read · Mobile, Observability
  Sentry's Flutter SDK 10.0 switches tracing to a streaming model that sends finished spans in batches instead of waiting for the whole transaction, with \`Sentry.startSpan\` for custom instrumentation and an opt-out via \`SentryTraceLifecycle.static\`.

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)
