binding_of_caller icon indicating copy to clipboard operation
binding_of_caller copied to clipboard

Reasons to not run binding_of_caller in production?

Open dhempy opened this issue 1 year ago • 1 comments

Our project uses Honeybadger to capture information around unrescued exceptions. It has a feature that can capture all the local variables around an exception. (Exceptions: local_variables: true) That feature uses your gem, binding_of_caller

We were super-excited to find that, but stopped short when we found your advice:

Recommended for use only in debugging situations. Do not use this in production apps.

Can you offer some more insight as to what some of the concerns are there?

Are there performance hits just for having the gem bundled? In our case, this would only come into play after an exception is raised, and we'd happily take that hit to get the insight. If it meant the entire app was slowed even if binding.of_caller was never invoked, that would be a deal-killer for us in production.

Are there other known reasons why using this in prod is a bad idea?

I read https://www.reddit.com/r/ruby/comments/5rw9po/why_is_binding_of_caller_dirty/ We're running Ruby 3.1.2 (specifically, docker/library/ruby:3.1.2 ), so I'm not sure how that commentary from 2015 around Ruby 1.9 -> 2.x applies today.

I'm not looking for any guarantee or specific advice...just seeking more insight to help us make an informed decision on how we might use the gem.

Thanks so much for creating and maintaining this gem of a gem!

dhempy avatar Oct 11 '23 18:10 dhempy

Should be fine to run in production these days

kp-john-mair avatar Oct 12 '23 03:10 kp-john-mair