Commit 01f7c39
committed
fix(webapp): restore Postgres fallback for non-ClickHouse OTLP spans
Environments with taskEventStore = 'taskEvent' / 'taskEventPartitioned' (Postgres-backed runs not yet migrated to ClickHouse) were hitting a throw in buildEventRepository when the org-scoped ClickHouse factory received those store values. The throw happened inside the grouping loop of #exportEvents, causing the entire OTLP request to return HTTP 500 — which the OpenTelemetry collector treats as non-retryable, silently dropping the full batch.
Fix: guard the getEventRepositoryForOrganizationSync call in #exportEvents to only invoke the ClickHouse factory for clickhouse/clickhouse_v2 stores. All other store values (taskEvent, taskEventPartitioned, postgres) route directly to the existing Postgres eventRepository, mirroring the pattern already used by resolveEventRepositoryForStore and getEventRepositoryForStore in eventRepository/index.server.ts.
Also wrap the factory call in a try/catch that falls back to Postgres so any future unexpected store values in an OTLP batch degrade gracefully instead of failing the whole request.1 parent 9cb6fd1 commit 01f7c39
1 file changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
127 | 143 | | |
128 | 144 | | |
129 | 145 | | |
| |||
0 commit comments