Design a Telemetry System for an Internal Developer Platform
System DesignModel answerLast updated
Design the data pipeline, key metrics, and adoption strategy for an internal compute platform used by hundreds of engineering teams.
Background
Your company runs an internal Serverless Compute Platform that engineering teams use to deploy and operate their services. Despite a strong pitch from the platform team, adoption has plateaued. Leadership wants to know why, and they want instrumentation to back up any answer.
You are the lead engineer responsible for making that happen.
What to Design
Functional Requirements
- Usage tracking. Record which teams are active on the platform, which features they use (auto-scaling, integrated logging, secret management, etc.), and how often they deploy.
- Performance visibility. Capture the latency of control-plane operations and the end-to-end duration of deployment pipelines.
- Developer feedback. Let engineers report friction points from within the CLI or the web dashboard, with just enough context to make the report actionable.
- Adoption dashboard. Show, at a glance, what fraction of services have moved to the new platform versus how many are still running on legacy infrastructure.
Non-Functional Requirements
- Freshness. Dashboard numbers must reflect reality within 5 minutes.
- Scale. Expect at least 10,000 deployments per day, with bursty peaks.
- Privacy. Application code, environment variables, secret values, and anything that looks like a credential must never appear in telemetry data.
Scope of Your Answer
Cover three areas:
- Data architecture — how events are collected, transported, processed, and stored.
- Metric design — which numbers you would actually put in front of a skeptical team lead to convince them to migrate.
- Adoption strategy — how you identify why specific teams are not migrating and what you do about it.
You do not need to design the platform itself, only the instrumentation and measurement layer around it.
Hints
Hint 1
The telemetry pipeline must never block or slow down an actual deployment. Think about where buffering and decoupling belong in your architecture.
Hint 2
You cannot compute 'percentage of services migrated' from platform events alone — legacy services emit no events. Where else does that denominator come from?
Hint 3
Before proposing fixes for resistant teams, ask whether their hesitation is a capability gap, a missing incentive, or a timing conflict. Each requires a different response.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Approach
This question is really two problems layered together: building a telemetry pipeline that fits the actual scale, and turning that data into organizational change. The technical design is not especially hard at this volume — the tricky parts are correctness, privacy, and metric framing.
1. Size the Problem First
Always do a rough estimate before drawing boxes.
- 10,000 deployments/day × ~20 lifecycle events each = 200K deployment events/day
- Control-plane API calls: roughly 5M/day, sampled or pre-aggregated at source
- CLI invocations: 500 teams × 30 engineers × 50 commands/day ≈ 750K/day
- Total: ~6M events/day, averaging ~70 events/s, peaking around 1K/s, at ~6 GB/day raw
Say this out loud: this is a modest workload. A managed stream (Kinesis or Kafka) plus a columnar OLAP store handles it comfortably. The engineering challenges are schema design, privacy enforcement, and metric definition — not throughput. Reaching for a 50-node cluster here is a red flag.
2. Event Schema and Ingestion API
All producers emit a single envelope type:
{
event_id: UUID // idempotency key
event_type: enum // deploy.started | deploy.finished | feature.used
// cli.command | feedback.submitted
occurred_at: timestamp // client clock
received_at: timestamp // server clock, set at ingestion
region: string
team_id: string
service_id: string
user_id_hash: string // hashed, never raw
attributes: map<string, scalar>
// e.g. feature="autoscaling", duration_ms=1200
schema_version: int
}
Endpoints:
POST /v1/events:batch— async ingestion, returns 202 immediatelyPOST /v1/feedback—{service_id, category, severity, free_text, context_event_id}GET /v1/metrics/adoption— serves pre-aggregated dashboard queries
3. Architecture
Producers (CLI, console, control plane, deploy pipeline)
│ async · local buffer · fire-and-forget
▼
Ingestion Gateway
├─ schema validation against registry
└─ PII / secret scrubber (allowlist fields, entropy scan)
▼
Regional Stream (Kafka / Kinesis), partitioned by service_id
├──► Stream processor (Flink) — 1-min tumbling windows
│ ▼
│ OLAP store (ClickHouse / Druid) ──► Dashboard [< 5 min latency]
├──► Raw sink ──► Object storage (Parquet by date/region)
│ ▼
│ Data warehouse for batch jobs and ad-hoc queries
└──► Feedback service ──► triage queue, linked to context event
Service Catalog (source of truth for legacy vs. platform)
└──► CDC into warehouse dimension tables
Three decisions worth defending explicitly:
Off the critical path. Producers write to a local bounded buffer and flush asynchronously. If the telemetry stack goes down, events are dropped or spooled to local disk, but a deployment is never delayed. Telemetry is a side effect, not a gate.
Privacy by allowlist, not denylist. The gateway rejects any field not declared in the schema registry. CLI args are reduced to command name and flag names — values are stripped. A secret scanner (entropy-based plus known key patterns like AWS key prefixes) quarantines matching events. User IDs are hashed; most queries only need team-level rollups. Feedback free-text goes through the same scanner, and the CLI prompt warns users not to paste credentials.
The adoption denominator lives in the service catalog, not in telemetry. Legacy services emit no platform events. If you only count what the platform sees, your "% migrated" is always 100%. The service catalog, joined via CDC into your warehouse, provides the true denominator of all services. This is the single most commonly missed piece in answers to this question.
4. Correctness Details
- Idempotency. Delivery is at-least-once. The stream processor deduplicates on
event_idwithin a 24-hour state window; the OLAP store uses a ReplacingMergeTree or equivalent. - Late data. Windows use event time with a ~2-minute watermark. Events that arrive after the watermark update the batch layer, which recomputes daily aggregates overnight and back-fills the real-time view.
- Deployment duration. Computed by joining
deploy.startedanddeploy.finishedon a shareddeployment_id. A start with no finish after a configurable timeout is emitted asstatus=abandoned— itself a meaningful signal of a broken pipeline. - Storage tiers. OLAP holds 1-minute rollups for 90 days. Raw Parquet is retained for two years for cohort and regression analysis.
5. Metrics That Actually Persuade
Separate vanity metrics from outcome metrics.
| Vanity (avoid leading with) | Outcome (lead with) |
|---|---|
| Total deployments | Migration completion rate by org |
| Teams onboarded | Time-to-first-successful-deploy for new services |
| Feature usage counts | 90-day retention: teams still deploying after onboarding |
| Platform-induced failure rate and MTTR |
The golden signal framing, translated to developer experience:
- Latency: p50/p95 pipeline duration and control-plane API latency, benchmarked against the same team's legacy pipeline
- Traffic: active services and deploy frequency per service — deploy frequency is a DORA metric most engineering leaders already track
- Errors: deploy failure rate split by user-caused vs. platform-caused, using an error-code taxonomy. Without this split, the platform unfairly absorbs blame for misconfigured applications, or misconfigured apps mask real platform bugs
- Saturation: quota hits, throttle events, cold-start rate, support ticket queue depth
The single most persuasive artifact is a before/after comparison for teams that have already migrated: deploy frequency, lead time, change-failure rate, on-call pages, and infrastructure cost. A team lead trusts "teams similar to yours are shipping twice as often and paging 40% less" far more than an aggregate adoption count.
6. Handling Resistant Teams
First, use your data to segment the resistance — do not assume everyone is hesitant for the same reason.
- Can't migrate. The platform is missing a capability they depend on (unsupported runtime, missing networking feature, no GPU support). Identify these by cross-referencing abandoned onboarding funnels and feature-gap feedback categories with the services still on legacy. Rank by number of blocked services and feed that directly into the platform roadmap.
- Won't migrate. No perceived incentive. For these teams, the before/after comparison above is the tool. Tie migration to a concrete business outcome — cost savings, incident reduction, or a policy requirement if the platform has a sunset date for legacy infrastructure.
- Not now. Real roadmap conflicts or upcoming service deprecations make migration genuinely low priority. Reduce the cost of eventual migration: provide codemods, one-click config converters, and dedicated migration support for high-priority services. Offer an embedded platform engineer for a sprint.
Track blocker categories on the dashboard alongside adoption numbers. If the "can't" category is not shrinking, the platform team is building the wrong things.
Common Mistakes
- Blocking deployments on telemetry writes — always async
- Forgetting the service catalog as the denominator for adoption rate
- Presenting feature-usage counts to a skeptical team lead instead of outcome metrics
- Treating all resistant teams the same without diagnosing the underlying reason
- Logging full CLI argument values, which often contain secrets or file paths with sensitive content