> Hi,
>
> I'm just wandering what the current plans are for adding user-defined
> metrics to uWSGI (https://github.com/unbit/uwsgi/issues/24)?
>
> I've found that the Java metrics package (http://metrics.codahale.com/)
> has
> been very useful for getting a better view into what's happening in
> production Java services.  Something analogous for Python services would
> be
> awesome! :)
>
> Note that I'm aware of scales (https://github.com/Cue/scales), but it
> looks
> like  it isn't suited to the pre-fork worker model because there's no
> aggregation across worker processes?  Putting this functionality into
> uWSGI
> itself seems like a very promising route.
>
> Cheers,
>
> John

There is now consensus about writing it as a cache2 abstraction.

Basically you will have a gathering thread (woke up every second) that will
get numbers from various sources (internal memory areas, pseudo-files and
so on) and write them in a uWSGI cache. Each metric has a key and a oid
(for SNMP integration). Usage of the key or the oid is stats-pusher
related (for example the carbon plugin will ignore the oid).

Finally the app itself can have its internal metric and can update them
whenever it needs (app-metrics can be generated on the fly, you do not
need to configure them, timed-metrics instead must be preallocated as the
gatherer thread is not programmable)

Currently there are 2 pieces missing before push:

- iterating over cache keys (solution already found, needs implementation)
- mapping multiple keys to to the same cache object (this is more complex,
i will work on it starting from next week)

-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to