sentry-symfony icon indicating copy to clipboard operation
sentry-symfony copied to clipboard

Add attribute/tag for command status tracking

Open revoltek-daniel opened this issue 6 months ago • 1 comments

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'}

revoltek-daniel avatar May 02 '25 20:05 revoltek-daniel

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 avatar May 05 '25 15:05 cleptric