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

Upgrading to v8.8.0 causes: Exception during Transaction#finish - ArgumentError: comparison of Float with String failed #1294

Closed
oboxodo opened this issue Jul 29, 2022 · 3 comments · Fixed by #1295
Assignees
Labels
bug community To tag external issues and PRs submitted by the community

Comments

@oboxodo
Copy link
Contributor

oboxodo commented Jul 29, 2022

Description

We upgraded our agent from 6.15.0 to 8.8.0, as part of some other upgrades including Rails 6.1.x to 7.0.3. We've been testing this for over a week on our staging environment on Heroku and it's been working fine (after correcting some config issues you can see in #1276).

Now we deployed the change to our production environment and suddenly we stopped getting data in our NR transactions graph, of course affecting our Apdex and we lost visibility to our platform's performance.

We found many instances of this in our logs:

2022-07-29T13:04:11.941883+00:00 app[web.1]: ** [NewRelic][2022-07-29 13:04:11 +0000 web.1 (81)] ERROR : Exception during Transaction#finish
2022-07-29T13:04:11.941903+00:00 app[web.1]: ** [NewRelic][2022-07-29 13:04:11 +0000 web.1 (81)] ERROR : ArgumentError: comparison of Float with String failed

Something odd seems to be happening in Transaction#finish somewhere. But it didn't happen in our staging environment, which is quite similar to our production one.

Googling shows this result for the same error message, but on a different method, plus that report is for a super old version so I don't want to risk applying the suggested monkey patch.

Expected Behavior

Transactions are properly reported and visible from NR's web UI.

Your Environment

  • ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [x86_64-linux]
  • rails 7.0.3
  • newrelic_rpm 8.8.0
  • hosted on Heroku

Additional context

@oboxodo oboxodo added the bug label Jul 29, 2022
@github-actions github-actions bot added the community To tag external issues and PRs submitted by the community label Jul 29, 2022
@oboxodo
Copy link
Contributor Author

oboxodo commented Jul 29, 2022

By the way, this is our config file:

common: &default_settings
  license_key: '<%= ENV["NEW_RELIC_LICENSE_KEY"] %>'
  app_name: <%= ENV["NEW_RELIC_APP_NAME"] %>
  log_level: info
  transaction_tracer.transaction_threshold: apdex_f

production:
  <<: *default_settings

@oboxodo
Copy link
Contributor Author

oboxodo commented Jul 29, 2022

We found that removing the transaction_tracer.transaction_threshold: apdex_f line from config fixes the problem. But that doesn't make much sense according to the config's comments which state we can set the apdex_f string, and that's even to be the default value.

This comment seems wrong.

This seems to not be doing its job, or not be called from somewhere where it should.

@tannalynn
Copy link
Contributor

I was able to reproduce the issue using your newrelic.yml snippet you provided and was able to determine that the agent was not checking for the apdex_f value when the configuration option was defined on one line, like your example. It was only expecting it to look like

    transaction_tracer:
      transaction_threshold: apdex_f 

I've created a PR to correct this issue since having it as a one liner shouldn't cause errors in the agent. Thank you for bringing this to our attention @oboxodo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug community To tag external issues and PRs submitted by the community
Projects
Archived in project
3 participants