Skip to content

Commit 307d39d

Browse files
d-csclaude
andcommitted
fix(webapp): make sentry processor singleton actually deduplicate
singleton() uses `__trigger_singletons[name] ??= getValue()`. A `void`-returning callback stores `undefined` in the cache, which `??=` treats as "still unset" — so every Remix dev reload re-evaluates the callback and re-registers the Sentry processor (the exact problem this wrapper was meant to prevent). Return `true` so the cache holds a real value and the guard kicks in. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9b72f93 commit 307d39d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

apps/webapp/app/entry.server.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ singleton("SentryTenantContextProcessor", () => {
300300
if (env.SENTRY_DSN) {
301301
Sentry.addEventProcessor(addTenantContextToEvent);
302302
}
303+
// Return a truthy value — `singleton()` uses `??=` so a `void`
304+
// callback would re-execute (and re-register) on every dev reload.
305+
return true;
303306
});
304307

305308
export { apiRateLimiter } from "./services/apiRateLimit.server";

0 commit comments

Comments
 (0)