-
Notifications
You must be signed in to change notification settings - Fork 600
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 from V8 to V9 causes transactions with custom names to disappear in UI and errors in the logs #1859
Comments
Thanks for reaching out and putting together such a great bug report, @NielsKSchjoedt! This is concerning behavior.
When encountering problems like this, I like to run the agent with debug-level logs and audit logs turned on and repeat the same behavior in both versions of the agent. To do this, update your configuration in newrelic.yml to set: log_level: debug
audit_log.enabled: true When you have the logs, I'd look for:
These logs can be really verbose, so I wouldn't recommend leaving this configuration when you're not actively debugging. This bug also sounds like a great candidate to work on through New Relic Support. You can engage the New Relic Support Community or open a support ticket, depending on your support level. If you choose to go this route, please provide a link to this GitHub issue when submitting your community post or support ticket. If you prefer to continue collaborating here, that's fine too! 😄 |
Hi @NielsKSchjoedt, one more thing -- 🚨 Please do not post these files directly to GitHub. 🚨 If you choose to post any code snippets, please make sure sensitive information is redacted. |
Experiencing the same issue with 9.0.0. We are coming from 8.16.0. |
Thanks @boomer196 for linking the two issues! We think the problem might be with our instrumentation for Fibers introduced in the 9.0 release. Could you try disabling the Fiber instrumentation and let us know if the problem persists? To disable the instrumentation in your instrumentation.fiber: disabled To disable the instrumentation using an environment variable add: |
@kaylareopelle, I disabled the fiber instrumentation as you suggested and the problem still occurs for us. As a side note do not use any custom names. Our implementation is basically out of the box defaults. |
Thanks for the follow-up, @boomer196! I'll keep searching for a solution. It sounds like you're using a Rails app. Which version are you on? Is your Ruby version 3.2? (it seems like this from the logs in the Explorer's Hub post) |
Yes @kaylareopelle, we are running |
I have another config I'd like you to try, @boomer196. Could you turn off thread tracing?
Turning this off in a sandbox environment with a similar error seemed to stop the problem. |
@kaylareopelle, setting |
Thank you, @boomer196. This helps us narrow down which PRs may have introduced the bug! I'm going to do a bit more tinkering and will reach out with a bug fix branch when ready. |
Hi @NielsKSchjoedt, @boomer196 - I have a bug fix branch I'd like you both to test out. It resolves the raised error, but I'm not sure if it'll solve the segments named To install it, please replace your current installation of
We'd also like you to turn thread instrumentation back on while testing. To do this, you can either change the value of |
@NielsKSchjoedt, we looked further into the way segments are reporting with Threads and noticed the When running in a sandbox Rack application that generates one thread per request, this is what we see in the old transaction view: And here's what we see in the new transaction view: In the bottom left corner of the graph, you can see Since thread instrumentation was turned on automatically in 9.0, this seems like the reason why upgrading changed the segment names. Thread instrumentation is optional. You can disable it, as mentioned above, by adding to your # newrelic.yml
instrumentation.thread.tracing: false |
@kaylareopelle, it did solve the raised error, but not the warnings. It appears to happen for all of our controller actions. Here is an example of the logged WARN:
|
@boomer196 - These warnings are most likely logged because an asynchronous process was running when the transaction completed. In this case the segment didn't finish through the standard path, but through a forced finish. The forced finish code path logs this warning. This is a bit of technical debt around our asynchronous segment timing we've discussed, but have not addressed because we were uncertain about what solution would be beneficial for our customers. I turned my notes on the team's prior discussions into this issue: #1884 What would you like to happen in this scenario? |
@kaylareopelle, thanks for opening that other issue. I will move over to #1884 to discuss desired behavior. As far as the exception we were seeing, it appears that by adding the |
Add information about: - newrelic/newrelic-ruby-agent#1859 - newrelic/newrelic-ruby-agent#1876
- Updated grammar - Include content from newrelic/newrelic-ruby-agent#1859
The changes provided by #1876 have been released in v9.1.0 of the |
I'm in the process of upgrading a large Rails 6.2 app running APM 8.16 to version 9.0.
In the transactions interface on some web transactions (seems to be the ones with custom transaction names) I see now that most time is attributed to a segment by the name
#
. What is this and why?In the
newrelic.log
I can see the following:The custom naming in rails controller looks like this:
I can see here that it seems to be
parent
which is nilnewrelic-ruby-agent/lib/new_relic/agent/transaction/abstract_segment.rb
Line 267 in 68a3405
The text was updated successfully, but these errors were encountered: