From 74f23f74592634336a6db98e48d917ef3e8f0883 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Sat, 8 Aug 2026 19:46:49 -0400 Subject: [PATCH] bring calls processed numeric metric in lock-step with a call_event log (originally calls processed was keyed off the start of a call, which can have misleading consequences about the true count of calls); --- src/fne/network/callhandler/TagAnalogData.cpp | 2 ++ src/fne/network/callhandler/TagDMRData.cpp | 3 ++- src/fne/network/callhandler/TagNXDNData.cpp | 3 ++- src/fne/network/callhandler/TagP25Data.cpp | 3 ++- src/fne/network/callhandler/packetdata/DMRPacketData.cpp | 3 ++- src/fne/network/callhandler/packetdata/P25PacketData.cpp | 3 ++- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/fne/network/callhandler/TagAnalogData.cpp b/src/fne/network/callhandler/TagAnalogData.cpp index 05feb51f..c26a6a88 100644 --- a/src/fne/network/callhandler/TagAnalogData.cpp +++ b/src/fne/network/callhandler/TagAnalogData.cpp @@ -183,6 +183,8 @@ bool TagAnalogData::processFrame(const uint8_t* data, uint32_t len, uint32_t pee TrafficNetwork::MetricsLogging::decrementActiveCalls(m_network); } + TrafficNetwork::MetricsLogging::incrementCallsProcessed(m_network); + // report call event to metrics TrafficNetwork::MetricsLogging::logCallEvent(m_network, "Analog", peerId, streamId, srcId, dstId, duration); diff --git a/src/fne/network/callhandler/TagDMRData.cpp b/src/fne/network/callhandler/TagDMRData.cpp index 8d686d1c..300483b0 100644 --- a/src/fne/network/callhandler/TagDMRData.cpp +++ b/src/fne/network/callhandler/TagDMRData.cpp @@ -284,6 +284,8 @@ bool TagDMRData::processFrame(const uint8_t* data, uint32_t len, uint32_t peerId TrafficNetwork::MetricsLogging::decrementActiveCalls(m_network); } + TrafficNetwork::MetricsLogging::incrementCallsProcessed(m_network); + // report call event to metrics TrafficNetwork::MetricsLogging::logCallEvent(m_network, "DMR", peerId, streamId, srcId, dstId, duration, slotNo); @@ -466,7 +468,6 @@ bool TagDMRData::processFrame(const uint8_t* data, uint32_t len, uint32_t peerId m_rejectedCallStreams.unlock(); if (!tg.config().parrot()) { - TrafficNetwork::MetricsLogging::incrementCallsProcessed(m_network); TrafficNetwork::MetricsLogging::incrementActiveCalls(m_network); } diff --git a/src/fne/network/callhandler/TagNXDNData.cpp b/src/fne/network/callhandler/TagNXDNData.cpp index eee49ee8..54168242 100644 --- a/src/fne/network/callhandler/TagNXDNData.cpp +++ b/src/fne/network/callhandler/TagNXDNData.cpp @@ -321,6 +321,8 @@ bool TagNXDNData::processFrame(const uint8_t* data, uint32_t len, uint32_t peerI TrafficNetwork::MetricsLogging::decrementActiveCalls(m_network); } + TrafficNetwork::MetricsLogging::incrementCallsProcessed(m_network); + // report call event to metrics TrafficNetwork::MetricsLogging::logCallEvent(m_network, "NXDN", peerId, streamId, srcId, dstId, duration); @@ -491,7 +493,6 @@ bool TagNXDNData::processFrame(const uint8_t* data, uint32_t len, uint32_t peerI m_rejectedCallStreams.unlock(); if (!tg.config().parrot()) { - TrafficNetwork::MetricsLogging::incrementCallsProcessed(m_network); TrafficNetwork::MetricsLogging::incrementActiveCalls(m_network); } diff --git a/src/fne/network/callhandler/TagP25Data.cpp b/src/fne/network/callhandler/TagP25Data.cpp index 9df9e861..e725008d 100644 --- a/src/fne/network/callhandler/TagP25Data.cpp +++ b/src/fne/network/callhandler/TagP25Data.cpp @@ -390,6 +390,8 @@ bool TagP25Data::processFrame(const uint8_t* data, uint32_t len, uint32_t peerId TrafficNetwork::MetricsLogging::decrementActiveCalls(m_network); } + TrafficNetwork::MetricsLogging::incrementCallsProcessed(m_network); + // report call event to metrics TrafficNetwork::MetricsLogging::logCallEvent(m_network, "P25", peerId, streamId, srcId, dstId, duration); @@ -571,7 +573,6 @@ bool TagP25Data::processFrame(const uint8_t* data, uint32_t len, uint32_t peerId m_rejectedCallStreams.unlock(); if (!tg.config().parrot()) { - TrafficNetwork::MetricsLogging::incrementCallsProcessed(m_network); TrafficNetwork::MetricsLogging::incrementActiveCalls(m_network); } diff --git a/src/fne/network/callhandler/packetdata/DMRPacketData.cpp b/src/fne/network/callhandler/packetdata/DMRPacketData.cpp index cf585bef..d48669d8 100644 --- a/src/fne/network/callhandler/packetdata/DMRPacketData.cpp +++ b/src/fne/network/callhandler/packetdata/DMRPacketData.cpp @@ -209,7 +209,6 @@ bool DMRPacketData::processFrame(const uint8_t* data, uint32_t len, uint32_t pee } LogInfoEx((fromUpstream) ? LOG_PEER : LOG_MASTER, "DMR, Data Call Start, peer = %u, slot = %u, srcId = %u, dstId = %u, group = %u, streamId = %u, fromUpstream = %u", peerId, status->slotNo, status->srcId, status->dstId, gi, streamId, fromUpstream); - TrafficNetwork::MetricsLogging::incrementCallsProcessed(m_network); return true; } @@ -260,6 +259,8 @@ bool DMRPacketData::processFrame(const uint8_t* data, uint32_t len, uint32_t pee LogInfoEx((fromUpstream) ? LOG_PEER : LOG_MASTER, "DMR, Data Call End, peer = %u, slot = %u, srcId = %u, dstId = %u, group = %u, blocks = %u, duration = %u, streamId = %u, fromUpstream = %u", peerId, srcId, dstId, gi, status->header.getBlocksToFollow(), duration / 1000, streamId, fromUpstream); + TrafficNetwork::MetricsLogging::incrementCallsProcessed(m_network); + // report call event to metrics TrafficNetwork::MetricsLogging::logCallEvent(m_network, "DMR", peerId, streamId, srcId, dstId, duration, slotNo); diff --git a/src/fne/network/callhandler/packetdata/P25PacketData.cpp b/src/fne/network/callhandler/packetdata/P25PacketData.cpp index 7b93c21c..36b7ce39 100644 --- a/src/fne/network/callhandler/packetdata/P25PacketData.cpp +++ b/src/fne/network/callhandler/packetdata/P25PacketData.cpp @@ -230,7 +230,6 @@ bool P25PacketData::processFrame(const uint8_t* data, uint32_t len, uint32_t pee } LogInfoEx((fromUpstream) ? LOG_PEER : LOG_MASTER, "P25, Data Call Start, peer = %u, llId = %u, streamId = %u, fromUpstream = %u", peerId, status->llId, streamId, fromUpstream); - TrafficNetwork::MetricsLogging::incrementCallsProcessed(m_network); continue; } @@ -278,6 +277,8 @@ bool P25PacketData::processFrame(const uint8_t* data, uint32_t len, uint32_t pee LogInfoEx((fromUpstream) ? LOG_PEER : LOG_MASTER, "P25, Data Call End, peer = %u, srcId = %u, dstId = %u, blocks = %u, duration = %u, streamId = %u, fromUpstream = %u", peerId, srcId, dstId, status->assembler.dataHeader.getBlocksToFollow(), duration / 1000, streamId, fromUpstream); + TrafficNetwork::MetricsLogging::incrementCallsProcessed(m_network); + // report call event to metrics TrafficNetwork::MetricsLogging::logCallEvent(m_network, "P25", peerId, streamId, srcId, dstId, duration);