The PR is finally up for review.

https://github.com/theforeman/foreman/pull/5096

I recorded short demo how to set it up with Prometheus via statsd:

https://youtu.be/i5iCOLEByZk

On Mon, Nov 20, 2017 at 3:46 PM, Lukas Zapletal <[email protected]> wrote:
> Hey,
>
> on the last demo I presented my proposal for telemetry (it is actually
> a separate video). I am looking for non-intrusive approach with broad
> integration possibilities:
>
> https://www.youtube.com/watch?v=gCLSI9-4QpE
>
> This was also showed on our demo last week (the same content):
> https://www.youtube.com/watch?v=QHzNIFjMpTM
>
> I am starting this thread to gather feedback before I open a PR with
> this. Currently the code is mostly in Rails initializer and looks like
> this:
>
> # get telemetry singleton instance and setup it
> telemetry = Foreman::Telemetry.instance.setup(... some options ...)
>
> # register measurements
> telemetry.add_counter(:http_requests, 'A counter of HTTP requests
> made', [:controller, :action])
> telemetry.add_histogram(:http_request_total_duration, 'Total
> duration', [:controller, :action])
> telemetry.add_counter(:activerecord_instances, 'Number of instances of
> AR models', [:class])
>
> # send measurements from Rails instrumentation or from code base
> telemetry.increment_counter(:http_requests, 1, :controller =>
> controller, :action => action, :status => status)
> telemetry.observe_histogram(:http_request_total_duration, duration,
> :controller => controller, :action => action)
>
> The proposed API is a single class (a singleton actually) with three
> registering methods and three measure methods. I don't think such a
> simple class needs proper separation of concerns, but we can talk
> about this in the PR. The registration part could be turned into some
> kind of DSL, currently it takes metric name, description and list of
> keys which will be part of an instance for those frameworks which do
> not support arbitrary amount of key-value pairs.
>
> If there are no objections, I will add settings and better error
> handling and file the PR.
>
> --
> Later,
>   Lukas @lzap Zapletal



-- 
Later,
  Lukas @lzap Zapletal

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to