Skip to content

Add attribute/tag for command status tracking #922

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

revoltek-daniel
Copy link

Added attribute/tag to track command status.

This feature helps to track status without adding check in tracking on every possible return.

In newer PHP versions you can add an attribute

#[SentryMonitorCommand(slug: 'test-command')]
class TestCommand extends Command

in older versions you can use a tag

App\Command\TestCommand:
    tags:
        - {name: 'sentry.monitor_command', slug: 'test-command'}

@cleptric
Copy link
Member

cleptric commented May 5, 2025

Thanks for taking the time to create the PR. We have a bunch of config options we should include to better support upserts, see https://docs.sentry.io/platforms/php/crons/#upserting-cron-monitors.

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

Successfully merging this pull request may close these issues.

2 participants