Feature #18675
Add 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.
Related issues
Associated revisions
Refs #18675 - Optionally load prometheus exporter
In case the bundler group telemetry is not installed, we should handle
that.
This moves the middleware loading to better match the other middleware.
Refs #18675 - Create a foreman-telemetry package
Also updates the nodejs dependencies.
Refs #18675 - create foreman-telemetry package
History
#1
Updated by The Foreman Bot over 5 years ago
- Status changed from New to Ready For Testing
- Assignee set to Lukas Zapletal
- Pull request https://github.com/theforeman/foreman/pull/4336 added
#2
Updated by The Foreman Bot over 4 years ago
- Pull request https://github.com/theforeman/foreman/pull/5096 added
#3
Updated by Bryan Kearney over 4 years ago
- Bugzilla link set to 1537078
#4
Updated by Lukas Zapletal over 4 years ago
- Pull request deleted (
https://github.com/theforeman/foreman/pull/4336)
#5
Updated by Lukas Zapletal over 4 years ago
- % Done changed from 0 to 100
- Status changed from Ready For Testing to Closed
Applied in changeset f020721dd1f1b7e3601a89ea5d2e0e9c0f4cea68.
#6
Updated by Daniel Lobato Garcia over 4 years ago
- Legacy Backlogs Release (now unused) set to 330
#7
Updated by The Foreman Bot over 4 years ago
- Pull request https://github.com/theforeman/foreman/pull/5275 added
#8
Updated by The Foreman Bot over 4 years ago
- Pull request https://github.com/theforeman/foreman-packaging/pull/2233 added
#9
Updated by The Foreman Bot over 4 years ago
- Pull request https://github.com/theforeman/foreman-packaging/pull/2230 added
#10
Updated by Lukas Zapletal over 4 years ago
- Related to Feature #23101: Expose telemetry parameters in settings.yaml added
#11
Updated by Lukas Zapletal over 4 years ago
- Related to Feature #22472: Add telemetry to discovery plugin added
#12
Updated by Lukas Zapletal over 4 years ago
- Related to Bug #22764: Telemetry errors out with undefined method `[]' for nil:NilClass on Rails code reload added
#13
Updated by Lukas Zapletal over 4 years ago
- Related to Feature #22796: Add fact importing telemetry added
Fixes #18675 - telemetry foreman API