You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cleanup configuration interface and make it fail gracefully #2800
Could it be changed such that if we are not initialized, we actually initialize Sentry? I feel this would prevent a whole class of NoMethod no nil errors I've personally run into.
Reproduction Steps
During app boot (after a new deploy for example), we occasionally run into this type of error.
I agree that this issue has gotten out of hand but to fix this is not so trivial and requires some core refactoring.
Could it be changed such that if we are not initialized, we actually initialize Sentry?
No, we cannot do that because that's not how the SDK design is supposed to be, that would defeat the purpose of having an initialize at all. But we could have a fallback configuration always, just that it could potentially cause weird behavior if not done properly.
Sentry is supposed to be initialized extremely early in your app startup process, could you try moving it (prefixing the initializer with 01_, for instance) so that it runs first?
Alternatively, can you tell me which particular check fails in your case so I can fix it?
yes this is indeed correct, but unfortunately we cannot impose an order of at_exits, especially with puma here since it's lower level than us. Even if you place Sentry's initializer first, puma will always run first since it spawns the workers.
I have a plan to make the configuration fetcher fail more gracefully and clean that interface with all usages, will ship that soon.
changed the title [-]`undefined method 'send_default_pii' for nil`[/-][+]Cleanup configuration interface and make it fail gracefully[/+]on Dec 15, 2025
Activity
linear commentedon Nov 27, 2025
RUBY-120
sl0thentr0py commentedon Dec 1, 2025
I agree that this issue has gotten out of hand but to fix this is not so trivial and requires some core refactoring.
No, we cannot do that because that's not how the SDK design is supposed to be, that would defeat the purpose of having an
initializeat all. But we could have a fallbackconfigurationalways, just that it could potentially cause weird behavior if not done properly.Sentry is supposed to be initialized extremely early in your app startup process, could you try moving it (prefixing the initializer with
01_, for instance) so that it runs first?Alternatively, can you tell me which particular check fails in your case so I can fix it?
crespire commentedon Dec 2, 2025
I can try to manipulate the loading order, let me see and I'll report back.
63 remaining items
sl0thentr0py commentedon Dec 15, 2025
thx for the update @crespire!
yes this is indeed correct, but unfortunately we cannot impose an order of
at_exits, especially with puma here since it's lower level than us. Even if you place Sentry's initializer first, puma will always run first since it spawns the workers.I have a plan to make the configuration fetcher fail more gracefully and clean that interface with all usages, will ship that soon.
[-]`undefined method 'send_default_pii' for nil`[/-][+]Cleanup configuration interface and make it fail gracefully[/+]crespire commentedon Dec 16, 2025
Happy to report that it seems the issue has subsided after fixing the Redis connection issues, along with the signal passing fix.