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

Add --sentry-trace CLI option #976

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stayallive
Copy link
Collaborator

@stayallive stayallive commented Jan 28, 2025

This PR adds a new --sentry-trace global CLI option. Every Artisan command can be triggered with this option and the Sentry SDK will wrap its execution in a transaction.

In addition to this, scheduled commands that are being ran in the background will get --sentry-trace applied by default so they are always traced.

This basically reverts #975 with extra steps 😅

Edit: As it turns out, adding parameters to the command string modifies the mutex, but since we add it only when it's being run the mutex is not always consistent resulting in commands just running once... needs some more adjustments! To be clear, the CLI option works great, adding it like we do to the scheduled command doesn't.

@stayallive stayallive requested a review from cleptric January 28, 2025 12:37
@stayallive stayallive self-assigned this Jan 28, 2025
@stayallive stayallive marked this pull request as ready for review January 28, 2025 12:44
@stayallive stayallive marked this pull request as draft January 28, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant