Open
Conversation
Added the ability to check sites using GET requests rather than HEAD. There is also a mode to use both HEAD and GET requests, log details if the results are different, and use the HEAD result for uptime/downtime.
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.
Part of the Jetpack Monitor: Full Site Sight project.
Proposed changes
This change adds per-site HTTP check modes to Jetmon so checks can run as HEAD, GET, or COMPARE. The mode is fetched from
jetpack_monitor_sites.check_mode, passed through theworker/native-addonboundary, and used by workers when scheduling requests.In COMPARE mode, Jetmon performs the normal HEAD check for uptime determination and sends a parallel GET request only for observability. If the HEAD and GET results differ, the mismatch is logged with the truncated raw response headers. This is intended to help identify sites where HEAD handling differs from GET without changing current monitor behavior for those sites.
The native checker was updated to support optional GET requests and to return a small raw-response payload to the worker for compare-mode logging. Redirect parsing was kept compatible with existing behavior by reading through the full response headers before deciding whether to follow a redirect. Veriflier behavior remains HEAD-based.
Testing instructions