It looks that we globally ignore methods named call here.
When we want to hook methods named call in our application Ruby classes (./app or ./lib in our case), is there any proper way to do this?
Currently, I'm working around it with a monkey patch like this:
# lib/appmap/hook.rb
module AppMap
class Hook
def trace_end(...)
...
local_path = location.delete_prefix(Dir.pwd + '/')
is_app = local_path.start_with?('app') || local_path.start_with?('lib')
next if !is_app && method_id == :call
But I think there must be a better way to do this.
It looks that we globally ignore methods named
callhere.When we want to hook methods named
callin our application Ruby classes (./appor./libin our case), is there any proper way to do this?Currently, I'm working around it with a monkey patch like this:
But I think there must be a better way to do this.