Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Error in Grape instrumentation

grape

#1

Ruby Question Template

  • Please provide a permalink so our experts can see into the exact time and place as you:

Not visible in my NR dashboard. I see this in my logs every second or so. Really eating into my log bandwidth and charges.

  • What language agent version are you using? Any other relevant versions? (Gems, etc.)

newrelic_rpm (6.1.0.352)
grape (1.2.3)

  • Paste in the error message you are seeing (text or screenshot).

Mar 16 05:33:37 newrelic_agent.log WARN +0000 (6188)] WARN : Error in Grape instrumentation
Mar 16 05:33:37 newrelic_agent.log WARN +0000 (6188)] WARN : NoMethodError: undefined method env' for nil:NilClass Mar 16 05:33:38 newrelic_agent.log WARN +0000 (6188)] WARN : Error in Grape instrumentation Mar 16 05:33:38 newrelic_agent.log WARN +0000 (6188)] WARN : NoMethodError: undefined methodenv’ for nil:NilClass

Also seeing a ton of these:

Mar 16 05:43:44 newrelic_agent.log ERROR +0000 (6188)] ERROR : Empty JSON response from collector: ‘""’
Mar 16 05:43:44 newrelic_agent.log ERROR +0000 (6188)] ERROR : Empty JSON response from collector: ‘""’
Mar 16 05:43:44 newrelic_agent.log ERROR +0000 (6188)] ERROR : Empty JSON response from collector: ‘""’
Mar 16 05:43:44 newrelic_agent.log ERROR +0000 (6188)] ERROR : Empty JSON response from collector: ‘""’

  • Describe your issue: what are you seeing? What were you expecting to see?
    Seeing errors referenced above in my logs. And grape execution details are no longer instrumented in my NR dashboard.

Ruby Agent Relic Solution - Disabling Instances


#2

hey @appsbeyond!

We just released 6.2 yesterday with the fix for the noisy logging around:

Mar 16 05:43:44 newrelic_agent.log ERROR +0000 (6188)] ERROR : Empty JSON response from collector: ‘""

Doing an upgrade will fix that.

However, for the other issue with Error in Grape instrumentation, can you tell me if this is new? If so, was there a previous version you were on where it wasn’t happening?

Even if you can’t see it in the UI, would you mind sharing a link to the app?


#3

Sure, here’s a link to the app: https://rpm.newrelic.com/accounts/1263454/applications/15026594/

Yes this is new. Part of my effort to update to Rails 5.2. I had the following working version before:
newrelic_rpm (4.8.0.341)
grape (1.0.2)
The error is definitely related to recent changes to support Grape’s latest (1.2) breaking changes. I see an entry in your changelog in version 5.7.
Is there a way to disable Grape instrumentation solely?

I’ll try the update for the Empty JSON response. Thanks!


#4

Thanks for the additional info!

I’ll check in with my team about the grape instrumentation error messages, but in the meantime, you should be able to disable Grape instrumentation using this disable_grape configuration option documented here:

https://docs.newrelic.com/docs/agents/ruby-agent/configuration/ruby-agent-configuration#disable_grape


#5

hey @appsbeyond,

We couldn’t reproduce the grape errors on our side.

If you would like to explore this issue further, let me know and we will open a support case so we can do a deeper dive.