module Datadog::Tracing::Contrib::ActionPack::ActionController::Instrumentation::Metal

def datadog_response_status

def datadog_response_status
  case response
  when ::ActionDispatch::Response
    response.status
  when Array
    # Likely a Rack response array: first element is the status.
    status = response.first
    status.class <= Integer ? status : nil
  end
end