Skip to content

Add attribute/tag for command status tracking#922

Draft
revoltek-daniel wants to merge 5 commits into
getsentry:masterfrom
revoltek-daniel:feature/cron-monitoring
Draft

Add attribute/tag for command status tracking#922
revoltek-daniel wants to merge 5 commits into
getsentry:masterfrom
revoltek-daniel:feature/cron-monitoring

Conversation

@revoltek-daniel

Copy link
Copy Markdown

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

cleptric commented May 5, 2025

Copy link
Copy Markdown
Member

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.

@cleptric cleptric marked this pull request as draft July 7, 2025 13:09
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