Project

General

Profile

Feature #18675

Add telemetry to Foreman core

Added by Lukas Zapletal over 1 year ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
Rails
Target version:

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

Related to Installer - Feature #23101: Expose telemetry parameters in settings.yamlClosed2018-04-03
Related to Discovery - Feature #22472: Add telemetry to discovery pluginReady For Testing2018-01-31
Related to Foreman - Bug #22764: Telemetry errors out with undefined method `[]' for nil:NilClass on Rails code reloadClosed2018-03-05
Related to Foreman - Feature #22796: Add fact importing telemetryClosed2018-03-06

Associated revisions

Revision f020721d (diff)
Added by Lukas Zapletal 6 months ago

Fixes #18675 - telemetry foreman API

Revision 4093de10 (diff)
Added by Ewoud Kohl van Wijngaarden 6 months ago

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.

Revision a5ac50ff (diff)
Added by Ewoud Kohl van Wijngaarden 6 months ago

Refs #18675 - Create a foreman-telemetry package

Also updates the nodejs dependencies.

Revision f6706bd7 (diff)
Added by Michael Moll 6 months ago

Refs #18675 - create foreman-telemetry package

History

#1 Updated by The Foreman Bot over 1 year 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 8 months ago

  • Pull request https://github.com/theforeman/foreman/pull/5096 added

#3 Updated by Bryan Kearney 7 months ago

  • Bugzilla link set to 1537078

#4 Updated by Lukas Zapletal 6 months ago

  • Pull request deleted (https://github.com/theforeman/foreman/pull/4336)

#5 Updated by Lukas Zapletal 6 months ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#6 Updated by Daniel Lobato Garcia 6 months ago

  • Legacy Backlogs Release (now unused) set to 330

#7 Updated by The Foreman Bot 6 months ago

  • Pull request https://github.com/theforeman/foreman/pull/5275 added

#8 Updated by The Foreman Bot 6 months ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/2233 added

#9 Updated by The Foreman Bot 6 months ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/2230 added

#10 Updated by Lukas Zapletal 5 months ago

  • Related to Feature #23101: Expose telemetry parameters in settings.yaml added

#11 Updated by Lukas Zapletal 5 months ago

#12 Updated by Lukas Zapletal 5 months ago

  • Related to Bug #22764: Telemetry errors out with undefined method `[]' for nil:NilClass on Rails code reload added

#13 Updated by Lukas Zapletal 5 months ago

Also available in: Atom PDF