Skip to content

Commit 3f96fc8

Browse files
committed
fix(webapp): remove overly-broad catch on ClickHouse factory resolution
As pointed out in code review: the guard on line 126 already screens out all non-ClickHouse store values, so the only values reaching getEventRepositoryForOrganizationSync are 'clickhouse' and 'clickhouse_v2' — both valid. The broad catch was unnecessary and harmful: a real ClickHouse resolution failure would have been silently routed to Postgres, writing spans where they'd be invisible on the ClickHouse read path.
1 parent 6b8058b commit 3f96fc8

1 file changed

Lines changed: 6 additions & 13 deletions

File tree

apps/webapp/app/v3/otlpExporter.server.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,21 +124,14 @@ class OTLPExporter {
124124
// Non-ClickHouse stores (taskEvent / taskEventPartitioned) are Postgres-backed.
125125
// The ClickHouse factory only handles clickhouse/clickhouse_v2 and throws otherwise.
126126
if (taskEventStore !== "clickhouse" && taskEventStore !== "clickhouse_v2") {
127+
// Non-ClickHouse stores (taskEvent / taskEventPartitioned) are Postgres-backed.
128+
// The ClickHouse factory only handles clickhouse/clickhouse_v2 and throws otherwise.
127129
resolved = { key: "postgres:default", repository: eventRepository };
128130
} else {
129-
try {
130-
resolved = this._clickhouseFactory.getEventRepositoryForOrganizationSync(
131-
taskEventStore,
132-
event.organizationId
133-
);
134-
} catch (error) {
135-
logger.error("[OTLPExporter] Failed to resolve ClickHouse event repository", {
136-
taskEventStore,
137-
organizationId: event.organizationId,
138-
error: error instanceof Error ? error.message : error,
139-
});
140-
resolved = { key: "postgres:default", repository: eventRepository };
141-
}
131+
resolved = this._clickhouseFactory.getEventRepositoryForOrganizationSync(
132+
taskEventStore,
133+
event.organizationId
134+
);
142135
}
143136
routeCache.set(routeKey, resolved);
144137
}

0 commit comments

Comments
 (0)