RDK-55826: Implement T2 Eventing in Network Manager Plugin#282
RDK-55826: Implement T2 Eventing in Network Manager Plugin#282gururaajar wants to merge 33 commits intodevelopfrom
Conversation
Reason for Change: Added T2 marker for the identified T1 telemetry markers Test Procedure: Check whether the T2 events are received in the elk. Priority: P1 Risks: Medium Signed-off-by: Gururaaja ESR<Gururaja_ErodeSriranganRamlingham@comcast.com>
Reason for Change: Added T2 marker for the identified T1 telemetry markers Test Procedure: Check whether the T2 events are received in the elk. Priority: P1 Risks: Medium Signed-off-by: Gururaaja ESR<Gururaja_ErodeSriranganRamlingham@comcast.com>
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
There was a problem hiding this comment.
Pull request overview
Adds T2 telemetry (eventing) support to the NetworkManager plugin to emit additional markers for key connectivity/WiFi lifecycle signals and related diagnostics.
Changes:
- Introduces T2 initialization and a
logTelemetry()helper, and emits new T2 events for public IP, interface changes, internet status, WiFi state, and error scenarios. - Adds gateway MAC discovery utilities (via NetworkManager active connection +
/proc/net/arp) and reports the MAC when IP is acquired. - Extends CMake to optionally enable and link against the T2 telemetry dependency.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| plugin/gnome/NetworkManagerGnomeWIFI.cpp | Emits telemetry when SSID input is empty. |
| plugin/gnome/NetworkManagerGnomeUtils.h | Declares new helper APIs for resolving gateway MAC. |
| plugin/gnome/NetworkManagerGnomeUtils.cpp | Implements gateway MAC resolution and retrieval from active connections. |
| plugin/gnome/NetworkManagerGnomeEvents.cpp | Hooks gateway MAC telemetry emission after IPv4 acquisition with caching. |
| plugin/NetworkManagerImplementation.h | Declares telemetry helper and adds conditional telemetry include. |
| plugin/NetworkManagerImplementation.cpp | Initializes T2 and emits multiple new telemetry events across state transitions. |
| plugin/CMakeLists.txt | Adds T2 dependency discovery/defines/linking for plugin targets. |
| CMakeLists.txt | Adds top-level USE_TELEMETRY option and T2 discovery/defines. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
…r into topic/RDK-55826
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #if USE_TELEMETRY | ||
| if(ipversion == "IPv4") | ||
| { | ||
| NMLOG_INFO("****** GURU: sending T2 event for NM_PUBLIC_IPV4 = %s ******", ipaddress.c_str()); |
There was a problem hiding this comment.
This INFO log prints the device public IPv4 address, which can be sensitive/PII in production logs. Consider removing the IP from the log (or redact it) and/or lowering to DEBUG; the telemetry event already carries the value.
| NMLOG_INFO("****** GURU: sending T2 event for NM_PUBLIC_IPV4 = %s ******", ipaddress.c_str()); | |
| NMLOG_INFO("****** GURU: sending T2 event for NM_PUBLIC_IPV4 ******"); |
| if (iss >> ip >> hwType >> flags >> hwAddr) { | ||
| if (ip == gatewayIp && hwAddr != "00:00:00:00:00:00") { | ||
| mac = hwAddr; | ||
| NMLOG_INFO("Resolved gateway IP %s to MAC %s", gatewayIp.c_str(), mac.c_str()); |
There was a problem hiding this comment.
This function logs the resolved gateway MAC at INFO level. MAC addresses are typically treated as sensitive identifiers; consider lowering this to DEBUG and/or avoid logging the full MAC unless needed for diagnostics.
| NMLOG_INFO("Resolved gateway IP %s to MAC %s", gatewayIp.c_str(), mac.c_str()); | |
| NMLOG_DEBUG("Resolved gateway IP %s to MAC %s", gatewayIp.c_str(), mac.c_str()); |
| NMLOG_INFO("******** GURU: gatewayMacCache[%s] : %s ********", ifname.c_str(), gatewayMacCache[ifname].c_str()); | ||
| #if USE_TELEMETRY | ||
| NMLOG_INFO("******** GURU: connected - Gateway MAC: %s ********", gatewayMac.c_str()); | ||
| _instance->logTelemetry("NM_GW_MAC", gatewayMac); |
There was a problem hiding this comment.
_instance->logTelemetry(...) is called without checking _instance != nullptr, while other callbacks in this file guard _instance first. During shutdown _instance is set to nullptr (see other uses below), so this can dereference null from the event thread. Add the same _instance != nullptr guard before calling logTelemetry.
| _instance->logTelemetry("NM_GW_MAC", gatewayMac); | |
| if (_instance != nullptr) { | |
| _instance->logTelemetry("NM_GW_MAC", gatewayMac); | |
| } |
…r into topic/RDK-55826
…r into topic/RDK-55826
| _notificationLock.Lock(); | ||
| NMLOG_INFO("Posting onWiFiStateChange (%d)", state); | ||
| #if USE_TELEMETRY | ||
| string stateStr = Core::EnumerateType<Exchange::INetworkManager::WiFiState>(state).Data(); |
There was a problem hiding this comment.
log always, dont need to check for state.
| prevState != Exchange::INetworkManager::INTERNET_NOT_AVAILABLE) | ||
| { | ||
| NMLOG_INFO("NM_ETHERNET_FAILED = Ethernet is down, no internet"); | ||
| logTelemetry("NM_ETHERNET_FAILED", "Ethernet is down, no internet"); |
There was a problem hiding this comment.
change the marker name to clearly indicate ethernet connectivity failed.
Reason for Change: Added T2 marker for the identified T1 telemetry markers
Test Procedure: Check whether the T2 events are received.
Priority: P1
Risks: Medium
Signed-off-by: Gururaaja ESRGururaja_ErodeSriranganRamlingham@comcast.com