Trying to rename a transaction to "..." after the transaction name is already frozen

I get the following warning for every request:

An attempt to rename a transaction to the controller / sessions / new after the transaction name has already been frozen.

I run on Cedar on Herek with Ruby 2.0.0p195 , Rails 4.0.0.rc , Unicorn 4.6.2 and RPM 3.6.2.96 . I traced the exception from the following file (line 108), but I'm not sure what to do to fix it:

https://github.com/newrelic/rpm/blob/master/lib/new_relic/agent/transaction.rb

+4
source share
1 answer

I work at New Relic.

When you receive such a message, it is connected with a component of our application, known as Real User Monitoring (RUM), which tries to control the page load time in the client’s browser. Why should this affect your ability to rename transactions? We base the synchronization in the user’s browser on the transaction ID that is attached to the transaction name on your server, and this information falls into the footer we created for your web page. When we create this footer, regardless of the name of the transaction, it will continue until the end of the transaction. If you have a slow page loading that corresponds to a transaction of a slow application server, and we recorded both traces, then in our user interface you can click between them (this slow page loading came from this particular slow transaction).

Rails 4 makes this pretty complicated if you use the turbolink function. We are working very quickly on explicit support, but since this means that the turbines mostly hinder the operation of the RUM after loading the first page (if you have links to it in it, anyway).

So, your options for fixing it:

  • rename the transaction earlier in the code sequence - preferably quite far to the end of the content generation (required before you get the exit, but in some cases sooner)
  • disable browser monitoring for this application, since you can rename transactions at any time

Please note that sentence 1 may not work, given the support status of our turbolinks. We will support this as soon as we can - of course, this year. Unfortunately, we do not promise deadlines, we just deliver functions, so I can not be more specific on the deadlines.

+2
source

Source: https://habr.com/ru/post/1481875/


All Articles