newrelic / newrelic-ruby-agent

New Relic RPM Ruby Agent
https://docs.newrelic.com/docs/apm/agents/ruby-agent/getting-started/introduction-new-relic-ruby/
Apache License 2.0
1.2k stars 598 forks source link

Resque data is being sent as Web data. #2771

Closed ChrisCPO closed 4 weeks ago

ChrisCPO commented 1 month ago

Update gem on two different Rails applications one update went fine, the other; all Resque data sent as "web" including the "non-web".

Description

I update the gem on the following two appications. App A had no issues and was a success, but when I updated App B, all data sent to new relic was type Web.

Expected Behavior

Resque to be reported at Non-Web data.

Steps to Reproduce

N/A

Your Environment

updated apps to versions:

App A(no issue):

App B(with issue):

Additional context

I have a weird hunch that this might possibly be related to an issue on Resque where ruby 3.3 results in stuck workers: https://github.com/resque/resque/issues/1895

For Maintainers Only or Hero Triaging this bug

Suggested Priority (P1,P2,P3,P4,P5): suggested t-shirt size (s, m, l, xl, unknown):

workato-integration[bot] commented 1 month ago

https://new-relic.atlassian.net/browse/NR-294921

kaylareopelle commented 1 month ago

Hi @ChrisCPO, thanks for your report. We're looking into this issue and will be back in touch with more info soon.

Are there any differences in the way Resque is configured in the two apps? Do both apps have similar jobs?

ChrisCPO commented 1 month ago

@kaylareopelle thanks for the quick reply.

Are there any differences in the way Resque is configured in the two apps?

There are no difference in our new relic configs.

Do both apps have similar jobs?

Yes

kaylareopelle commented 1 month ago

Hi @ChrisCPO, thanks for the follow-up. Unfortunately, we haven't been able to reproduce this issue.

Here's a link to a simple reproduction: https://gist.github.com/kaylareopelle/76079747c1a7528449670b8bd1c78893

With this gist, I was able to create Resque transactions correctly marked as 'Non-Web'. We also tested similar code within a Rails 7.1.3.2 / Ruby 3.3 app with jobs running outside of a web transaction and couldn't reproduce the behavior.

After taking a look at the diff between Resque 2.5.0 and 2.6.0, the changes shouldn't impact the agent. We also haven't made changes to our Resque instrumentation in recent versions of newrelic_rpm.

At this time, my best guess is the problem relates to the bug report you shared.

If there's something else you'd like us to test, please share a reproduction or update the provided gist to more closely match your situation. We're happy to take a look.