Conversation
Operators cannot graph or alert on Pitchfork soft worker timeouts. This commit exposes `discourse_pitchfork_worker_timeouts_total` when core emits `web_worker_timeout`. Reporting uses a dedicated synchronous client with a one-second budget so observations can reach the collector before worker exit. Hard kills bypassing the callback are not counted.
tgxworld
added a commit
to discourse/discourse
that referenced
this pull request
Sep 25, 2026
Pitchfork logs worker timeouts, but plugins have no event they can use to record them. This commit adds `web_worker_timeout` so the [Prometheus plugin](discourse/discourse-prometheus#175) can count timeouts before workers exit.
Use the synchronous client API proposed in discourse/prometheus_exporter#384. Remove explicit queue draining and Ruby Timeout. The draft remains dependent on an exporter release and a matching gem version update.
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.
This commit adds
discourse_pitchfork_worker_timeouts_totalso operators can graph and alert on Pitchfork soft worker timeouts. Eachweb_worker_timeoutevent sends one observation synchronously through$prometheus_clientbefore the worker exits.Requires the core event and the synchronous exporter API. Before merging, release the exporter API and update the plugin's gem version. The currently pinned version does not support
PrometheusExporter::Client#send_json_sync.