Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5f623e4 to
f55a493
Compare
3d1e53e to
e32423c
Compare
dd88a29 to
a801303
Compare
b0dc1c9 to
34744e4
Compare
8c9c85f to
7dae1da
Compare
593bc1e to
54723bb
Compare
9a158de to
e456a33
Compare
c17a1b9 to
093303d
Compare
093303d to
fd67cf7
Compare
fd67cf7 to
85fa781
Compare
85fa781 to
c414627
Compare
f7f2312 to
f88050e
Compare
f88050e to
c12b869
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements network performance feature, more details in the issue.
Related issue
Closes #3062
flowchart TD SDK["Mobile SDK"] -->|"HTTP event"| Events["events table"] Events -->|"MV: http_events_mv<br/>extracts domain, path, status_code,<br/>latency_ms, session_elapsed_ms"| HttpEvents["http_events table<br/>(MergeTree)"] subgraph "Background Jobs (alerts service)" GenPatterns["GeneratePatterns job"] GenMetrics["GenerateMetrics job"] end HttpEvents -->|"fetch grouped by<br/>domain, path<br/>since last run"| GenPatterns GenPatterns -->|"normalize paths → trie<br/>→ collapse segments<br/>with >10 children to *"| UrlPatterns["url_patterns table<br/>(ReplacingMergeTree)"] HttpEvents -->|"JOIN with url_patterns<br/>to match events → patterns<br/>(startsWith / LIKE / exact)"| GenMetrics GenMetrics -->|"INSERT INTO http_metrics<br/>15-min buckets, per status_code,<br/>method, app_version, device..."| HttpMetrics["http_metrics table<br/>(AggregatingMergeTree)"] GenPatterns -.->|"upsert pattern_generated_at"| PgReporting["network_metrics_reporting<br/>(Postgres)"] GenMetrics -.->|"upsert metrics_reported_at"| PgReporting subgraph "API Queries (api service)" direction TB Domains["FetchDomains<br/>GROUP BY domain<br/>ORDER BY count()"] Paths["FetchPaths<br/>url_patterns + fallback http_events"] Trends["FetchTrends<br/>top endpoints by<br/>p95 latency, error rate, frequency"] OverviewStatus["GetNetworkOverviewStatusCodesPlot<br/>countIf per 2xx/3xx/4xx/5xx<br/>over time buckets"] OverviewTimeline["FetchOverviewTimeline<br/>per-session avg request count<br/>in 5s elapsed buckets, top 20"] EndpointLatency["GetEndpointLatencyPlot<br/>p50/p90/p95/p99 latency<br/>over time buckets"] EndpointStatus["GetEndpointStatusCodesPlot<br/>2xx/3xx/4xx/5xx per bucket<br/>for single endpoint"] EndpointTimeline["FetchEndpointTimeline<br/>per-session avg request count<br/>in 5s elapsed buckets<br/>for single endpoint"] end HttpEvents -->|"direct query"| Domains HttpEvents -->|"direct query"| OverviewStatus HttpEvents -->|"direct query"| EndpointLatency HttpEvents -->|"direct query"| EndpointStatus UrlPatterns -->|"pattern lookup"| Paths UrlPatterns -->|"existence check"| EndpointTimeline HttpMetrics -->|"aggregated query"| Trends HttpMetrics -->|"aggregated query"| OverviewTimeline HttpMetrics -->|"aggregated query"| EndpointTimeline classDef action fill:#dcfce7,stroke:#16a34a,color:#166534 classDef skip fill:#f1f5f9,stroke:#94a3b8,color:#475569 classDef note fill:#fef9c3,stroke:#ca8a04,color:#713f12 class Events,HttpEvents,UrlPatterns,HttpMetrics action class GenPatterns,GenMetrics note class PgReporting skip class Domains,Paths,Trends,OverviewStatus,OverviewTimeline,EndpointLatency,EndpointStatus,EndpointTimeline skip