Il 02/12/2015 18:12, Alexandre Bonnetain ha scritto:
Hi !

I'm new to the uwsgi community, but I'm implementing new features we
need in my team.

Welcome!

Currently, I'm working on a metric system supporting the creation of
metrics during the runtime and I would like to know how other uwsgi
developper would implement it.

Am looking at the metrics subsystem for the first time, uwsgi_metrics_loop
may give you some hints on how metrics are scanned and the locking needed
when touch uwsgi.metrics.

I think you can hack a quick prototype by using something like -1 as a
freq value to indicate to do not collect the metric and by modifying it
at runtime. This would let you just turn on / off them though and not
dinamically add them. But once you have the locking right it could be doable.

The choice I made is to let the original metric system untouched, and
to make a new system with less features but supporting the creation at
runtime. It's an hard choice, but I don't know how to do better, since
creation of metrics cannot be added to the current system and I'm a
bit afraid of modifying the whole metric system to support creation.

I don't think that duplicating a subsystem would be something that can be applied upstream :)

--
Riccardo Magliocchetti
@rmistaken

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

Reply via email to