Skip to content

Add --sentry-trace CLI option#976

Draft
stayallive wants to merge 2 commits into
masterfrom
command-and-background-tracing
Draft

Add --sentry-trace CLI option#976
stayallive wants to merge 2 commits into
masterfrom
command-and-background-tracing

Conversation

@stayallive

@stayallive stayallive commented Jan 28, 2025

Copy link
Copy Markdown
Collaborator

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.

2 participants