cloudfoundry-community / autosleep

Auto sleep service for CloudFoundry
Apache License 2.0
39 stars 21 forks source link

Instrumentation and business metrics #278

Open gberche-orange opened 7 years ago

gberche-orange commented 7 years ago

As a service provider, in order to justify investments into autosleep, I need metrics about amount of resources saved by autosleep (nb of RAM hours, nb of app instance hours), derived from cumulative sleeping time for application.

As a service provider, in order to improve the autosleep algorithms to provide better UX, I need data about autosleep-related user actions: opt-out (cf unbind-service), manual application wakeup (cf start).

Sleeping time for an application, is elapsed time between a stop triggered by autosleep, and a start performed by users or by autowakeup.


In terms of implementation, autosleep is currently fetching recent app events (along with recent logs, and may increase fetch frequency with #187). The load distribution model in #185 is likely to assign enrolled application to one autosleep instance. This could therefore make sense to have autosleep emit per enrolled app events/metrics, e.g. using springboot metrics support and a new independently deployed component aggregate these metrics.

/CC @pradyutsarma