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

Rails v7.1: Make sure the Trilogy MySQL adapter is identified and supported correctly #2221

Open
fallwith opened this issue Sep 15, 2023 · 14 comments · May be fixed by #2966
Open

Rails v7.1: Make sure the Trilogy MySQL adapter is identified and supported correctly #2221

fallwith opened this issue Sep 15, 2023 · 14 comments · May be fixed by #2966
Assignees
Labels
oct-dec qtr Possible FY Q3 candidate

Comments

@fallwith
Copy link
Contributor

Already production tested by GitHub and Shopify, GitHub's MySQL adapter Trilogy is available in Rails v7.1 as an out-of-the-box choice. We should ensure that Trilogy is correctly identified by our instrumentation.

Use rails 7.1.0.beta1 or EDGE to test with.

@fallwith fallwith added estimate Issue needing estimation oct-dec qtr Possible FY Q3 candidate labels Sep 15, 2023
@workato-integration
Copy link

@kford-newrelic kford-newrelic added 1 Story Point Estimate and removed estimate Issue needing estimation labels Sep 26, 2023
@kford-newrelic kford-newrelic moved this from Triage to To do in Ruby Engineering Board Oct 2, 2023
@workato-integration
Copy link

@joevandyk
Copy link

(Trilogy can also be used by Rails 6 and 7.0)

@hannahramadan hannahramadan moved this from To do to In progress in Ruby Engineering Board Nov 3, 2023
@hannahramadan hannahramadan self-assigned this Nov 3, 2023
@hannahramadan
Copy link
Contributor

The Ruby agent correctly identifies and reports Trilogy as a database adapter. Tested with Ruby agent 9.6.0, Rails 7.1.1, and Trilogy 2.6.0.

From the New Relic UI:
Screenshot 2023-11-06 at 4 49 57 PM

@github-project-automation github-project-automation bot moved this from In progress to Code Complete/Done in Ruby Engineering Board Nov 7, 2023
@gdubicki
Copy link

@hannahramadan: is it possible that this has been implemented only for Rails 7.1+?

We have just tried to use NewRelic agent 9.12.0, Rails 7.0.8.4 and Trilogy 2.8.1, and while it did show up in the UI as in your screenshot, all the time spend on DB queries was attributed to Ruby and there were no MySQL queries shown...

@tannalynn
Copy link
Contributor

@gdubicki It may be possible since we have only tested on rails 7.1, but no new code was added for trilogy. It was already working via the already existing active record instrumentation, which should work for all rails versions. So I'm not sure exactly what could be going on with what you are describing. We can take a look again at running an app with trilogy to see if we can see anything unusual going on. In the meantime though, if you have additional details about that maybe helpful in our attempt to reproduce the problem, that would be appreciated!

@rodolfoburla
Copy link

Can you re-open this issue ? We are facing the same issue mentioned by @gdubicki, even though the agent identifies the adapter correctly we have no MySQL trace on APM. We are using rails 7.1.4, new relic agent 9.15.0, trilogy 2.9.0, ruby 3.3.5.

@kaylareopelle kaylareopelle reopened this Nov 19, 2024
@kaylareopelle
Copy link
Contributor

Thank you for letting us know, @rodolfoburla! We'll take another look.

@workato-integration
Copy link

Work has been completed on this issue.

@tannalynn tannalynn reopened this Nov 19, 2024
@hannahramadan hannahramadan moved this from Code Complete/Done to In Sprint in Ruby Engineering Board Nov 19, 2024
@hannahramadan hannahramadan removed the 1 Story Point Estimate label Nov 19, 2024
@rodolfoburla
Copy link

More context here, queries are displayed on traces as ActiveRecord. But when looking at APM->Databases there is no MySql there, so looking at the source code I think it is missing to map Trilogy to MySql.

@hannahramadan hannahramadan linked a pull request Nov 20, 2024 that will close this issue
@hannahramadan
Copy link
Contributor

@rodolfoburla, @gdubicki - Thank you and apologies for missing this the first time around! We've put together a branch that we think solves this issue and would love any feedback on it. To use, please update your Gemfile to install the newrelic_rpm gem using:

gem 'newrelic_rpm', github: 'newrelic/newrelic-ruby-agent', branch: 'are_you_there_trilogy'

@rodolfoburla
Copy link

@hannahramadan Thank you, we have tested and now the Database view has MySql again. Do you have any idea when it is going to be released?

@hannahramadan
Copy link
Contributor

Thank you for testing, @rodolfoburla! We are planning a release the first week of December and will include this fix. I will follow up here when it is live.

@rodolfoburla
Copy link

Thank you @hannahramadan, btw once it is released I think you should update the documentation here: https://docs.newrelic.com/docs/apm/agents/ruby-agent/getting-started/ruby-agent-requirements-supported-frameworks/#instance_details .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oct-dec qtr Possible FY Q3 candidate
Projects
Status: In Sprint
Development

Successfully merging a pull request may close this issue.

8 participants