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

OPTION to disable auto transaction creation #1035

Closed
Legion112 opened this issue Jul 28, 2023 · 2 comments
Closed

OPTION to disable auto transaction creation #1035

Legion112 opened this issue Jul 28, 2023 · 2 comments
Labels
agent-php enhancement New feature or request

Comments

@Legion112
Copy link

Legion112 commented Jul 28, 2023

Is your feature request related to a problem? Please describe.
I wanna user custom transaction creation with naming offered by framework.
There is a way to disable auto transaction creation for HTTP request via transaction_ignore_urls but there is no way to do same for cli command.

Describe the solution you'd like
Would be nice to have a single option that disables entirely auto transaction creation like transaction_auto which would have default value to true

Changes have to be made inside here:

private function beginTransaction(float $requestInitStartTime): ?TransactionInterface
{
if (!self::isCliScript()) {

Before executing this method we should check if it is allowed to created transaction automatically via setting (transaction_auto)

@Legion112 Legion112 added the enhancement New feature or request label Jul 28, 2023
@SergeyKleyman
Copy link
Contributor

You can achieve your goal using public API ElasticApm::getCurrentTransaction()->discard().

@Legion112
Copy link
Author

No longer interested in this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-php enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants