Skip to content

add observability to checkmate test#854

Merged
santicomp2014 merged 3 commits intomainfrom
add-observabilty-status
Feb 24, 2026
Merged

add observability to checkmate test#854
santicomp2014 merged 3 commits intomainfrom
add-observabilty-status

Conversation

@santicomp2014
Copy link
Contributor

@santicomp2014 santicomp2014 commented Feb 20, 2026

This pull request enhances the monitoring and observability of the Checkmate health check in the StatusView by adding structured logging, Sentry tracing, and breadcrumbs for both success and failure scenarios. It also introduces comprehensive tests to verify these behaviors.

Observability and error reporting improvements:

  • Added detailed logging for Checkmate health check successes and failures using the logging module, including error details and stack traces. [1] [2]
  • Integrated Sentry tracing by wrapping the Checkmate check in a Sentry span, setting appropriate status and error metadata, and capturing exceptions. Also added Sentry breadcrumbs on failure for better error context. [1] [2]

Code organization:

  • Refactored the Checkmate health check logic into a dedicated _check_checkmate method for clarity and maintainability.

Testing improvements:

  • Added new unit tests to verify logging, Sentry span creation, Sentry exception capturing, and breadcrumb addition for both success and failure cases in the Checkmate health check.
  • Introduced fixtures to mock Sentry SDK methods in tests, ensuring isolation and accurate assertions.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request enhances observability for the Checkmate health check in the StatusView by adding structured logging, Sentry tracing, and comprehensive test coverage for these new behaviors. The changes focus on improving error reporting and diagnostics when interacting with the Checkmate service.

Changes:

  • Refactored Checkmate health check logic into a dedicated _check_checkmate method with Sentry span tracing
  • Added structured logging for both success and failure scenarios with detailed exception information
  • Enhanced test coverage with new tests for logging behavior, Sentry span creation, breadcrumb addition, and exception capturing

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
viahtml/views/status.py Refactored checkmate health check into separate method with logging and Sentry instrumentation
tests/unit/viahtml/views/status_test.py Added comprehensive tests for logging and Sentry observability features
Comments suppressed due to low confidence (1)

tests/unit/viahtml/views/status_test.py:2

  • The MagicMock import is unused and should be removed. The tests only use create_autospec from unittest.mock.
from unittest.mock import MagicMock, create_autospec

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@santicomp2014 santicomp2014 self-assigned this Feb 20, 2026
@santicomp2014 santicomp2014 merged commit 2ef80d6 into main Feb 24, 2026
4 checks passed
@santicomp2014 santicomp2014 deleted the add-observabilty-status branch February 24, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants