Skip to content

Feat/health checks#128

Merged
ManukMinasyan merged 13 commits intomainfrom
feat/health-checks
Feb 16, 2026
Merged

Feat/health checks#128
ManukMinasyan merged 13 commits intomainfrom
feat/health-checks

Conversation

@ManukMinasyan
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 16, 2026 16:07
# Conflicts:
#	app/Providers/HealthServiceProvider.php
#	config/app.php
#	config/health.php
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 PR introduces a comprehensive health monitoring system using Spatie's Laravel Health package. The implementation is opt-in via configuration and adds monitoring for critical application components including database, Redis, queues, disk space, CPU load, and security advisories.

Changes:

  • Added health check functionality using Spatie Laravel Health with configurable opt-in via HEALTH_CHECKS_ENABLED environment variable
  • Configured import-related jobs to use dedicated 'imports' queue for better monitoring and separation of concerns
  • Removed empty routes/console.php file as scheduling is now handled in bootstrap/app.php

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
app/Providers/HealthServiceProvider.php New service provider that registers comprehensive health checks when enabled via config
bootstrap/providers.php Registered HealthServiceProvider in alphabetically sorted provider list
bootstrap/app.php Added health check scheduling commands and removed reference to deleted console routes file
config/app.php Added health_checks_enabled configuration option with environment variable support
config/health.php Configuration for Spatie Health package including result stores, notifications, and Oh Dear integration
.env.example Added documentation for health check environment variables
tests/Feature/HealthChecks/HealthServiceProviderTest.php Tests verifying health checks are registered only when enabled
app-modules/ImportWizard/src/Jobs/ExecuteImportJob.php Assigned job to 'imports' queue for monitoring
app-modules/ImportWizard/src/Jobs/ResolveMatchesJob.php Assigned job to 'imports' queue for monitoring
app-modules/ImportWizard/src/Jobs/ValidateColumnJob.php Assigned job to 'imports' queue for monitoring
routes/console.php Removed empty console routes file
composer.json Added spatie/laravel-health, spatie/cpu-load-health-check, and spatie/security-advisories-health-check packages
composer.lock Lock file updates for new health check dependencies
Comments suppressed due to low confidence (1)

app/Providers/HealthServiceProvider.php:41

  • The named parameter errorThresholdGb is inconsistent with the fluent method naming convention used elsewhere in this file. Other health check methods use implicit parameter names (e.g., warnWhenMoreConnectionsThan(50), failWhenAboveMb(1_000)). For consistency, consider removing the named parameter and just using failWhenSizeAboveGb(10.0) to match the pattern used throughout the rest of the health checks configuration.
            DatabaseSizeCheck::new()
                ->failWhenSizeAboveGb(errorThresholdGb: 10.0),

@ManukMinasyan ManukMinasyan merged commit bfcc0b5 into main Feb 16, 2026
9 checks passed
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.

1 participant