Issue with RCLCPP THROTTLE logging in the plugin based approach
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- cpp
- Ambito
- observability-sre
Direzione di ricerca
Inizia leggendo rcutils/resource/logging_macros.h.em, in particolare la logica RCUTILS_LOG_CONDITION_THROTTLE_BEFORE citata nel report, e traccia il percorso con cui RCLCPP_XXX_THROTTLE la raggiunge. Verifica il comportamento con più istanze del plugin che utilizzano nomi di logger diversi; il lavoro è completato quando ogni logger ha un intervallo di throttle indipendente. Il payload non indica alcun file di test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?
- Lingua principale
- C++
- Stelle
- 829
- Fork
- 587
- Merge medio
- 4g 6h
- PR unite (30g)
- 30
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ros2/rclcpp
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
Memory grows per callback group created and destroyed on long lived nodesForse già presa @jwallace42 l’ha presa 1 giorno fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
ros2/rclcpp#3428 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
removing and immediately re-adding a node to the EventsCBGExecutor leaves its entities unregisteredForse già presa @skyegalaxy l’ha presa 10 giorni fa. Apertabug
ros2/rclcpp#3418 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Humble] Removing a node with more than one auto-added callback group leaves a dangling guard condition in the executorForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
ros2/rclcpp#3410 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
arch-based bug niri
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
noctalia-dev/noctalia#5552 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
EchoTools/nevr-runtime#2912 ·
I maintainer di solito rispondono entro 1 giorno
-
area/docdb kind/failing-test priority/medium status/awaiting-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
yugabyte/yugabyte-db#39462 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
meshtastic/firmware#12519 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno