def get_symbolized_path(request)
      request_path = (request.env['REQUEST_URI'] || request.path).dup
      request_params =
        request.env['action_dispatch.request.parameters'] ||
        request.env['rack.request.form_hash'] ||
        request.env['rack.request.query_hash']

      if request_params
        request_params
          .except(*EXCLUDE_PARAMS)
          .select { |_, value| value.is_a?(String) }
          .each { |key, value| request_path.sub!("/#{value}", "/:#{key}") if value.to_s != '' }
      end

      request_path.freeze
    end
def get_symbolized_path(request)
      request_path = (request.env['REQUEST_URI'] || request.path).dup
      request_params =
        request.env['action_dispatch.request.parameters'] ||
        request.env['rack.request.form_hash'] ||
        request.env['rack.request.query_hash']

      if request_params
        request_params
          .except(*EXCLUDE_PARAMS)
          .select { |_, value| value.is_a?(String) }
          .each { |key, value| request_path.sub!("/#{value}", "/:#{key}") if value.to_s != '' }
      end

      request_path.freeze
    end
replace each first occurrence of param's value in the request path

 Example:
   request path = /api/users/123
   id = 123
   symbolized path => /api/users/:id