napalm-logs
napalm-logs copied to clipboard
Add log processing delay metric
Expose a new metric napalm_logs_processing_delay that provides
a (rough?) view on how long it takes a message to be processed through
napalm-logs - from the moment the message is received, till published.
This timing excludes the time spent effectively publishing (as it may
depend of various external factors), but it includes the time spent in
the internal queues.
Example:
# HELP napalm_logs_processing_delay Multiprocess metric
# TYPE napalm_logs_processing_delay gauge
napalm_logs_processing_delay{address="0.0.0.0",pid="17389",port="49017",publisher_type="zmq"} 0.001567363739013671
I'm wondering whether it makes sense to have the labels from the publisher (i.e., have separate delay report for each distinct publisher). Or even have labels from the message type (e.g., napalm_logs_processing_delay{error='BGP_PREFIX_LIMIT_EXCEEDED'} 0.001567363739013671? Or not at all maybe... :thinking: