Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cron Monitoring] Whether to consider adding a switch configuration option for Cron monitoring? #836

Closed
summerKK opened this issue Jan 23, 2024 · 2 comments

Comments

@summerKK
Copy link
Contributor

Problem Statement

The scenario goes like this.
If I run in dev environment, php artisan schedule:run, Cron side will generate CheckIn, resulting in a lot of CheckIn. Can you consider adding a configuration option to avoid dev environment to enable this function?

Solution Brainstorm

sentry.php

[
    'crons' => [
        'monitor_enabled' => env('SENTRY_CRONS_MONITOR_ENABLED', false),
    ],
]

src/Sentry/Laravel/Features/ConsoleIntegration.php

public function isApplicable(): bool
{
    return $this->container()->make(Application::class)->runningInConsole() && $this->isCronsFeatureEnabled('monitor_enabled');
}
@summerKK
Copy link
Contributor Author

I created a PR 😎
#837

@cleptric
Copy link
Member

cleptric commented Jan 29, 2024

before_send_check_in was added to the PHP SDK in v4.5.0. Just update the Laravel SDK to v4.2.0, and you can start using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants