-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSDK-6170 - add debug log support #299
base: main
Are you sure you want to change the base?
Conversation
@dgottlieb fyi! |
Just noticed that the commit hash starts with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly minor changes, maybe we should also add a change to one of the unit tests using a peek_debug_key
parameter or similar?
AttributeMap debug_map(std::string debug_key); | ||
|
||
/// @brief Adds @param debug_key for server-side debug logging to @param map | ||
/// @throws Exception if the debug_key contains invalid (e.g., uppercase )gRPC characters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slight typo with the close paren
AttributeMap add_debug_entry(AttributeMap map, std::string debug_key); | ||
|
||
/// @brief Adds a random key to @param map for server-side debug logging | ||
AttributeMap add_debug_entry(AttributeMap&& map); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the one above should probably pass the parameter in the same way?
|
||
AttributeMap debug_map() { | ||
auto debug_key = random_debug_key(); | ||
return debug_map(debug_key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return debug_map(debug_key); | |
return debug_map(random_debug_key()); |
Adds support for server-side debug logging.
Note to reviewers: this PR gets us 90+% of the way to where we want to be. The problem is that a few methods (
get_properties
andis_moving
, e.g.) do not takeextra
as a param. I spent some time brainstorming but I don't see a way to support adding debug logs for these without adding new params to the methods (which would be breaking). Even if we decided to break things, we'd either have to addextra
to these (which would be misleading to users) or add a special field to these (which would have unclear/ambiguous utility to many implementers and would create inconsistency in our implementation that could be confusing for users). As such, I've opted to go with the "good enough" approach; we can cross this bridge if/when if a user desperately needs debug log support for these particular methods sometime in the future.example code:
example output:
Flybys:
include
/using
invocationsArm::move_to_joint_positions