Feature #18675
closedAdd telemetry to Foreman core
Description
Rails provides many instrumentation points which can be very easily hooked and exported to statsd and then to graph solutions or monitoring. Protocol statsd is very simple, UDP based and provides decent integration options. This change will be unintrusive, telemetry will be opt-in and it will be always disabled for test environment. It will also work without any external service sending the telemetry data into Rails logger if needed.
This initial implementation provides Rails controller processing times for individual controllers and actions (view, db, total times in ms). In addition, it provides number of success/failed login attempts, ActiveRecord instantianed classes, Foreman templates rendering time and ActionMailer sent mail counts.
The only dependency introduced is pure-Ruby library "statsd-instrument" that provides client library for statsd daemon. The idea is to run this daemon on localhost aggregating the data and/or sending to RRD or other monitoring solutions.