1.7.0
-
Add Server-Timing headers
Server-Timing is a HTTP header to provide metrics about backend runtimes.
It's disabled by default, and it has to be enabled for each request.
You will probably prefer to limit to privileged users in production to prevent from exposing sensitive data.
Here is a good default setup, to enable server timing in all environments and only for admins in production:class ApplicationController < ActionController::Base before_action :expose_server_timing_headers def expose_server_timing_headers # Assuming there are current_user and admin? methods RorVsWild.send_server_timing = !Rails.env.production? || current_user.try(:admin?) end end
-
Sample requests and jobs to lower our customers' bills
These parameters should be used by large volume applications only.
When the volume is significant, sending more does not improve precision and sending less does not decrease it.
More precisely, for a large volume of requests but a low volume of jobs, it makes sens to sample requests only.# config/rorvswild.yml production: api_key: API_KEY job_sampling_rate: 0.5 # 50% of jobs are sent request_sampling_rate: 0.25 # 25% of requests are sent