class Sentry::Profiler
def compute_filename(abs_path, in_app)
TODO-neel-profiler try to fetch this from stackprof once we patch
copied from stacktrace.rb since I don't want to touch existing code
def compute_filename(abs_path, in_app) return nil if abs_path.nil? under_project_root = @project_root && abs_path.start_with?(@project_root) prefix = if under_project_root && in_app @project_root else longest_load_path = $LOAD_PATH.select { |path| abs_path.start_with?(path.to_s) }.max_by(&:size) if under_project_root longest_load_path || @project_root else longest_load_path end end prefix ? abs_path[prefix.to_s.chomp(File::SEPARATOR).length + 1..-1] : abs_path end