Repository navigation
fix(sentry): drop enable_logs from the Temporal worker Sentry.init - #253
Merged
Merged
Conversation
sentry-ruby 7.0.0 removed `enable_logs`, and #242 migrated config/initializers/sentry.rb for it — but bin/temporal_worker calls Sentry.init a second time, with its own DSN, after config/environment. That call kept the flag, so the worker raised NoMethodError from inside Sentry.init and died on boot. Nothing but the initializer is loaded by `assets:precompile`, so the image built green and the failure only appeared in the cluster: every worker-ruby pod hit CrashLoopBackOff, no one polled the Temporal task queue, and every WorkflowRun created afterwards sat in `pending` indefinitely — which reads on screen as sessions waiting on a concurrency limit that is nowhere near full. No behaviour to preserve: under 7.0 logs are unconditionally on, and this init sets no enabled_patches, so the `:logger` patch that would turn the worker's own log output into Sentry log events stays off. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
This was referenced Sep 12, 2026
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.
What broke
Every
worker-rubypod in production is inCrashLoopBackOff, failing at boot:sentry-ruby7.0.0 removedenable_logs. #242 migratedconfig/initializers/sentry.rbforit, but
bin/temporal_workercallsSentry.inita second time — with its ownSettings.sentry.temporal_dsn, afterconfig/environment— and that call still carried theflag.
assets:precompilenever loadsbin/temporal_worker, so the image built green and thefailure surfaced only in the cluster.
Why it looked like a concurrency-limit problem
No worker polls the Temporal task queue, so
workflow_execution_workflow_v2never starts andevery
WorkflowRuncreated after the rollout stays inpending— noTerminalSessionrow,no admission, nothing for the queue to grant. On screen that reads as sessions stuck waiting
for capacity.
Production, project 27, at the time of diagnosis:
project:27limit=20,occupied=6,queued=0SessionConcurrencyLimitmax_sessions=20enabled=true,paused=falseWorkflowRunrunningWorkflowRunpending2026-09-12T12:54:47Z12:54 is the minute the sentry-7 image finished rolling out; the last run that started was
12:53:50. The admission queue was never the constraint.
Second-order damage while the worker is down:
SessionAdmissionReconcilerdoes not runeither —
cleanup_lag_seconds: 807,uncertain_operations: 23,pinned_reservations: 2.Those should clear on their own once the worker is back.
The change
Drop the line. Under 7.0 logs are unconditionally on, and this
Sentry.initsets noenabled_patches, so the:loggerpatch that would turn the worker's own log output intoSentry log events stays off — same as before.
🤖 Generated with Claude Code