# measure-sh/measure architecture

> Architecture diagram of the GitHub repository measure-sh/measure, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/measure-sh/measure
- Repository: https://github.com/measure-sh/measure

## Overview

Measure is a mobile observability product: platform SDKs collect app signals, backend services receive and process them, and the dashboard supports investigation. The README highlights session replay, app health, crashes/ANRs, traces, bug reports, journeys, network performance, adaptive capture, and natural-language agent workflows; these are represented without assuming unsampled implementation details. Android source-index references support the session/config/storage links shown. Other backend and cross-service relationships are documented only at product level, so uncertain internal calls are omitted.

Main entry points: [`frontend/dashboard`](https://github.com/measure-sh/measure/tree/main/frontend/dashboard) (Observability dashboard), [`backend/ingest`](https://github.com/measure-sh/measure/tree/main/backend/ingest) (Signal ingestion), [`android/measure-android/measure/src/main/java/sh/measure/android`](https://github.com/measure-sh/measure/tree/main/android/measure-android/measure/src/main/java/sh/measure/android) (Android SDK), [`android/measure-android/measure/src/main/java/sh/measure/android/SessionManager.kt`](https://github.com/measure-sh/measure/blob/main/android/measure-android/measure/src/main/java/sh/measure/android/SessionManager.kt) (Session management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sdk["Mobile SDKs"]
  node_android_sdk["Android SDK"]
  node_ios_sdk["iOS SDK"]
  node_rn_sdk["React Native SDK"]
  node_sdk_capture["App signal capture"]
  node_session["Session management<br/>[SessionManager.kt]"]
  node_dynamic_config["Adaptive configuration<br/>[ConfigProvider.kt]"]
  node_local_store[("Local signal storage<br/>[Database.kt]")]
end

subgraph group_backend["Backend services"]
  node_ingest["Signal ingestion"]
  node_ingest_worker["Ingest processing"]
  node_api["Product API<br/>[app.go]"]
  node_alerts["Alerts"]
end

subgraph group_product["Investigation product"]
  node_dashboard["Observability dashboard"]
  node_replay["Session replay"]
  node_health["App health"]
  node_crashes["Crashes and ANRs"]
  node_traces["Performance traces"]
  node_bug_reports["Bug reports"]
  node_journeys["User journeys"]
  node_network["Network performance"]
end

subgraph group_agent["Agent access"]
  node_agent_service["Measure Agent"]
end

node_developer(("Mobile team"))
node_slack(("Slack and MCP clients"))

node_developer -->|"integrates"| node_android_sdk
node_developer -->|"integrates"| node_ios_sdk
node_developer -->|"integrates"| node_rn_sdk
node_android_sdk -->|"captures signals"| node_sdk_capture
node_sdk_capture -.->|"tracks sessions"| node_session
node_session -->|"reads configuration"| node_dynamic_config
node_session -->|"persists session data"| node_local_store
node_android_sdk -->|"sends telemetry"| node_ingest
node_ios_sdk -->|"sends telemetry"| node_ingest
node_rn_sdk -->|"sends telemetry"| node_ingest
node_ingest -.->|"processes signals"| node_ingest_worker
node_developer -->|"investigates issues"| node_dashboard
node_dashboard -.->|"requests product data"| node_api
node_dashboard -->|"shows"| node_replay
node_dashboard -->|"shows"| node_health
node_dashboard -->|"shows"| node_crashes
node_dashboard -->|"shows"| node_traces
node_dashboard -->|"shows"| node_bug_reports
node_dashboard -->|"shows"| node_journeys
node_dashboard -->|"shows"| node_network
node_dashboard -.->|"surfaces alerts"| node_alerts
node_slack -->|"asks questions"| node_agent_service
node_agent_service -.->|"uses app context"| node_dashboard

click node_android_sdk "https://github.com/measure-sh/measure/tree/main/android/measure-android/measure/src/main/java/sh/measure/android"
click node_ios_sdk "https://github.com/measure-sh/measure/tree/main/ios/Sources/MeasureSDK/Swift"
click node_rn_sdk "https://github.com/measure-sh/measure/tree/main/react-native/src"
click node_sdk_capture "https://github.com/measure-sh/measure/tree/main/android/measure-android/measure/src/main/java/sh/measure/android"
click node_session "https://github.com/measure-sh/measure/blob/main/android/measure-android/measure/src/main/java/sh/measure/android/SessionManager.kt"
click node_dynamic_config "https://github.com/measure-sh/measure/blob/main/android/measure-android/measure/src/main/java/sh/measure/android/config/ConfigProvider.kt"
click node_local_store "https://github.com/measure-sh/measure/blob/main/android/measure-android/measure/src/main/java/sh/measure/android/storage/Database.kt"
click node_ingest "https://github.com/measure-sh/measure/tree/main/backend/ingest"
click node_ingest_worker "https://github.com/measure-sh/measure/tree/main/backend/ingest-worker"
click node_api "https://github.com/measure-sh/measure/blob/main/backend/api/handlers/app.go"
click node_alerts "https://github.com/measure-sh/measure/tree/main/backend/alerts"
click node_dashboard "https://github.com/measure-sh/measure/tree/main/frontend/dashboard"
click node_replay "https://github.com/measure-sh/measure/tree/main/frontend/dashboard"
click node_health "https://github.com/measure-sh/measure/tree/main/frontend/dashboard"
click node_crashes "https://github.com/measure-sh/measure/tree/main/frontend/dashboard"
click node_traces "https://github.com/measure-sh/measure/tree/main/frontend/dashboard"
click node_bug_reports "https://github.com/measure-sh/measure/tree/main/frontend/dashboard"
click node_journeys "https://github.com/measure-sh/measure/tree/main/frontend/dashboard"
click node_network "https://github.com/measure-sh/measure/tree/main/frontend/dashboard"
click node_agent_service "https://github.com/measure-sh/measure/tree/main/backend/agent"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_android_sdk,node_ios_sdk,node_rn_sdk,node_sdk_capture,node_session,node_dynamic_config,node_local_store,node_slack toneBlue
class node_ingest,node_ingest_worker,node_api,node_alerts toneAmber
class node_dashboard,node_replay,node_health,node_crashes,node_traces,node_bug_reports,node_journeys,node_network toneMint
class node_agent_service toneRose
class node_developer toneIndigo
```

## Components

### Mobile SDKs

- [Android SDK](https://github.com/measure-sh/measure/tree/main/android/measure-android/measure/src/main/java/sh/measure/android): `android/measure-android/measure/src/main/java/sh/measure/android`
- [iOS SDK](https://github.com/measure-sh/measure/tree/main/ios/Sources/MeasureSDK/Swift): `ios/Sources/MeasureSDK/Swift`
- [React Native SDK](https://github.com/measure-sh/measure/tree/main/react-native/src): `react-native/src`
- [App signal capture](https://github.com/measure-sh/measure/tree/main/android/measure-android/measure/src/main/java/sh/measure/android): `android/measure-android/measure/src/main/java/sh/measure/android`
- [Session management](https://github.com/measure-sh/measure/blob/main/android/measure-android/measure/src/main/java/sh/measure/android/SessionManager.kt): `android/measure-android/measure/src/main/java/sh/measure/android/SessionManager.kt`
- [Adaptive configuration](https://github.com/measure-sh/measure/blob/main/android/measure-android/measure/src/main/java/sh/measure/android/config/ConfigProvider.kt): `android/measure-android/measure/src/main/java/sh/measure/android/config/ConfigProvider.kt`
- [Local signal storage](https://github.com/measure-sh/measure/blob/main/android/measure-android/measure/src/main/java/sh/measure/android/storage/Database.kt): `android/measure-android/measure/src/main/java/sh/measure/android/storage/Database.kt`

### Backend services

- [Signal ingestion](https://github.com/measure-sh/measure/tree/main/backend/ingest): `backend/ingest`
- [Ingest processing](https://github.com/measure-sh/measure/tree/main/backend/ingest-worker): `backend/ingest-worker`
- [Product API](https://github.com/measure-sh/measure/blob/main/backend/api/handlers/app.go): `backend/api/handlers/app.go`
- [Alerts](https://github.com/measure-sh/measure/tree/main/backend/alerts): `backend/alerts`

### Investigation product

- [Observability dashboard](https://github.com/measure-sh/measure/tree/main/frontend/dashboard): `frontend/dashboard`
- [Session replay](https://github.com/measure-sh/measure/tree/main/frontend/dashboard): `frontend/dashboard`
- [App health](https://github.com/measure-sh/measure/tree/main/frontend/dashboard): `frontend/dashboard`
- [Crashes and ANRs](https://github.com/measure-sh/measure/tree/main/frontend/dashboard): `frontend/dashboard`
- [Performance traces](https://github.com/measure-sh/measure/tree/main/frontend/dashboard): `frontend/dashboard`
- [Bug reports](https://github.com/measure-sh/measure/tree/main/frontend/dashboard): `frontend/dashboard`
- [User journeys](https://github.com/measure-sh/measure/tree/main/frontend/dashboard): `frontend/dashboard`
- [Network performance](https://github.com/measure-sh/measure/tree/main/frontend/dashboard): `frontend/dashboard`

### Agent access

- [Measure Agent](https://github.com/measure-sh/measure/tree/main/backend/agent): `backend/agent`

### Other components

- **Mobile team**
- **Slack and MCP clients**

## Connections

- Mobile team → Android SDK: integrates (evidence: `README.md`)
- Mobile team → iOS SDK: integrates (evidence: `README.md`)
- Mobile team → React Native SDK: integrates (evidence: `README.md`)
- Android SDK → App signal capture: captures signals (evidence: `README.md`)
- App signal capture → Session management: tracks sessions (evidence: `android/measure-android/measure/src/main/java/sh/measure/android/storage/DataCleanupService.kt`)
- Session management → Adaptive configuration: reads configuration (evidence: `android/measure-android/measure/src/main/java/sh/measure/android/SessionManager.kt`)
- Session management → Local signal storage: persists session data (evidence: `android/measure-android/measure/src/main/java/sh/measure/android/SessionManager.kt`)
- Android SDK → Signal ingestion: sends telemetry (evidence: `README.md`)
- iOS SDK → Signal ingestion: sends telemetry (evidence: `README.md`)
- React Native SDK → Signal ingestion: sends telemetry (evidence: `README.md`)
- Signal ingestion → Ingest processing: processes signals
- Mobile team → Observability dashboard: investigates issues (evidence: `README.md`)
- Observability dashboard → Product API: requests product data
- Observability dashboard → Session replay: shows (evidence: `README.md`)
- Observability dashboard → App health: shows (evidence: `README.md`)
- Observability dashboard → Crashes and ANRs: shows (evidence: `README.md`)
- Observability dashboard → Performance traces: shows (evidence: `README.md`)
- Observability dashboard → Bug reports: shows (evidence: `README.md`)
- Observability dashboard → User journeys: shows (evidence: `README.md`)
- Observability dashboard → Network performance: shows (evidence: `README.md`)
- Observability dashboard → Alerts: surfaces alerts
- Slack and MCP clients → Measure Agent: asks questions (evidence: `README.md`)
- Measure Agent → Observability dashboard: uses app context
