Issue with RCLCPP THROTTLE logging in the plugin based approach
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- cpp
- Bereich
- observability-sre
Rechercherichtung
Beginnen Sie mit dem Lesen von rcutils/resource/logging_macros.h.em, insbesondere der im Bericht referenzierten RCUTILS_LOG_CONDITION_THROTTLE_BEFORE-Logik, und verfolgen Sie, wie RCLCPP_XXX_THROTTLE dorthin gelangt. Überprüfen Sie das Verhalten mit mehreren Plugin-Instanzen, die unterschiedliche Logger-Namen verwenden; abgeschlossen bedeutet, dass jeder Logger ein unabhängiges Throttle-Intervall hat. Die Nutzlast nennt keine Testdatei.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Bug report
Hello!
I've a plugin that I use it to perform some computations and return and this plugin runs at a higher frequency, and then to reduce spamming, I've changed the original logging with THROTTLE. It works fine as long as only one plugin is loaded in my system. If I load multiple plugins of the same type, it doesn't print the THROTTLE log of other plugins but only the first one even though they have different loggers with different names.
I believe this is caused by the fact that the RCLCPP_XXX_THROTTLE internally uses the following macro RCUTILS_LOG_CONDITION_THROTTLE_BEFORE and this is using some static variables inside. The condition for logging (i.e., if a certain duration has passed since the last log message) will remain the same, as this is determined by the code in the macro, not by the logger. The __rcutils_logging_last_logged variable, which keeps track of the last time a log message was outputted, is static and unique to each line where the macro is used. Therefore, even if you change the logger, the duration-based condition for logging will still be unique to each line.
I think it makes sense to also consider the logger type to be same or not in the same check as well. In my current implementation, the logger name is changed depending on the name of the plugin, but not the type. This way it is unique for every plugin instance.
Required Info:
- Operating System:
- Ubuntu 22.04 and 24.04
- Installation type:
- Binaries
Expected behavior
Different loggers should have different throttles even if they are in the same line as the plugin
Actual behavior
Different loggers are throttles as one and the information is lost inside the plugin
Is there a workaround or a better approach in this case?
- Vorherrschende Sprache
- C++
- Sterne
- 829
- Forks
- 587
- Ø Merge
- 4 T. 6 Std.
- Gemergte PRs (30 T.)
- 30
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ros2/rclcpp
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
Maintainer antworten meist innerhalb von 1 Tag
-
Memory grows per callback group created and destroyed on long lived nodesEvtl. vergeben @jwallace42 hat das vor 1 Tag übernommen. Offenbug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 28/100
ros2/rclcpp#3428 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
removing and immediately re-adding a node to the EventsCBGExecutor leaves its entities unregisteredEvtl. vergeben @skyegalaxy hat das vor 10 Tagen übernommen. Offenbug
ros2/rclcpp#3418 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Humble] Removing a node with more than one auto-added callback group leaves a dangling guard condition in the executorEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
ros2/rclcpp#3410 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
arch-based bug niri
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
noctalia-dev/noctalia#5552 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 82/100
EchoTools/nevr-runtime#2912 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/docdb kind/failing-test priority/medium status/awaiting-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
yugabyte/yugabyte-db#39462 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
meshtastic/firmware#12519 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
Maintainer antworten meist innerhalb von 1 Tag