You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code in Plack::Middleware::NewFangle assumes that start_web_transaction always returns a valid transaction. This is partially the case: it will always return an object you can call methods on, and the methods will only do useful things when the transaction is valid.
However, starting a transaction can sometimes fail. In those cases, you get a null transaction, and since the code does not check whether the transaction is valid or not, you end up with a lot of noise in the logs:
2021-10-28 14:53:11.882 +0100 (11 11) error: unable to start transaction
2021-10-28 14:53:11.882 +0100 (11 11) error: unable to add attribute for a NULL transaction
2021-10-28 14:53:11.882 +0100 (11 11) error: unable to add attribute for a NULL transaction
2021-10-28 14:53:11.882 +0100 (11 11) error: unable to add attribute for a NULL transaction
2021-10-28 14:53:11.882 +0100 (11 11) error: unable to start segment with NULL transaction
However, it does not seem like there is an easy way to check whether the transaction is valid or not: there is no method to check it in NewFangle, and the documentation for start_web_transaction does not actually mention the possibility of it retuning an invalid transaction:
Given an application pointer and transaction name, this function begins timing a new transaction. It returns a valid pointer to an active New Relic transaction, newrelic_txn_t. The return value of this function may be used as an input parameter to functions that modify an active transaction.
The text was updated successfully, but these errors were encountered:
The code in Plack::Middleware::NewFangle assumes that
start_web_transaction
always returns a valid transaction. This is partially the case: it will always return an object you can call methods on, and the methods will only do useful things when the transaction is valid.However, starting a transaction can sometimes fail. In those cases, you get a null transaction, and since the code does not check whether the transaction is valid or not, you end up with a lot of noise in the logs:
However, it does not seem like there is an easy way to check whether the transaction is valid or not: there is no method to check it in NewFangle, and the documentation for
start_web_transaction
does not actually mention the possibility of it retuning an invalid transaction:The text was updated successfully, but these errors were encountered: