text: You add ReadMe middleware to your Rails application.
  ReadMe extracts information to display in Metrics, such as which endpoint is being called, response code, and error messages. It also identifies the customer who called your API, using whichever keys in the middleware you call out as containing relevant customer info.
  Add the gem to your projects Gemfile
  gem "readme-metrics"
  In the root of your project install the new gem
  Configure the middleware in your
  development.rb and
  production.rb files:
  Readme::Metrics class takes an options hash argument that should at least contain and api_key key:
  { api_key: "<<user>>" }
  It also requires a block which should return a hash describing the user generating the request/response. These values maybe be fetched from the environment or hard-coded:
  { api_key: "api_key", label: "User Name", email: "[email protected]" }
  In the examples below, the Rails application is using a warden-based authentication gem (e.g., Devise), so the user can be fetched via the WardenProxy stored in the environment.
  config/environmments/development.rb
  require "readme/metrics"
  api_key: "<<user>>",
  config.middleware.use Readme::Metrics, options do |env|
  current_user = env['warden'].authenticate
  api_key: current_user.id,
  label: current_user.name,
  api_key: "guest",
  label: "Guest User",
  options = { api_key: "<<user>>" }
  There are a few options in addition to
  api_key you can pass in to change how the logs are sent to ReadMe. These are all optional:
  default: 10 By default, we only send logs to ReadMe after 10 requests are made. Depending on the usage of your API it might make sense to send logs more or less frequently.
  reject_params
  An array of strings representing keys from your API requests' and responses' bodies and headers that you wish to omit from sending to ReadMe.
  You may only configure either reject_params or allow_only at one time
  reject_params: ["Authorization", "password"]
  An array of strings representing keys from your API requests' and responses' bodies and headers that you only wish to send to ReadMe. All other keys will be omitted
  default: Logger logging to stdout A logger class that conforms to the same interface as Logger or RailsLogger. Pass this option in if you have some custom logging solution and you want to send logs from the middleware to the same location.