mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
telemetry/Manager: Track sent_in and sent_out totals without callback
For terminated threads, the totals would go down once the threads are removed, which isn't great. Move tracking of sent in and sent out messages from callback to explicit `Inc()` calls. Also fixes total_messages_in_metric being initialized twice rather than total_messages_out_metric.
This commit is contained in:
parent
c55b2ece8f
commit
351f16c160
3 changed files with 21 additions and 19 deletions
|
@ -388,6 +388,8 @@ void MsgThread::SendIn(BasicInputMessage* msg, bool force) {
|
|||
|
||||
queue_in.Put(msg);
|
||||
++cnt_sent_in;
|
||||
|
||||
zeek::thread_mgr->MessageIn();
|
||||
}
|
||||
|
||||
void MsgThread::SendOut(BasicOutputMessage* msg, bool force) {
|
||||
|
@ -400,6 +402,8 @@ void MsgThread::SendOut(BasicOutputMessage* msg, bool force) {
|
|||
|
||||
++cnt_sent_out;
|
||||
|
||||
zeek::thread_mgr->MessageOut();
|
||||
|
||||
if ( io_source )
|
||||
io_source->Fire();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue