Skip to content
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

Add tracing instrumentation using tracetools #294

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from

Conversation

christophebedard
Copy link
Member

@christophebedard christophebedard commented Oct 10, 2024

With this instrumentation, rmw_zenoh_cpp is supported out-of-the-box by tools that process ROS 2 trace data, such as Eclipse Trace Compass.

It's pretty straightforward except for a few things:

  1. Getting the rmw_publisher_t * for the rmw_publish tracepoint
    • Add it to PublisherData.
  2. Getting the source timestamp for the rmw_publish tracepoint
    • Getting the source timestamp of a message being published is needed for tracking messages from publisher to subscription.
    • Since Add timestamp to rmw_publish tracepoint ros2_tracing#74, we're getting the source timestamp for a published message from rmw. This means we don't need to instrument the underlying middleware itself, which we used to have to do.
    • I modified create_map_and_set_sequence_num() to be able to extract the source timestamp.
  3. Getting the/a subscription rmw GID for the rmw_subscription_init tracepoint
    • See the comment before the tracepoint.

I'm open to suggestions.

@christophebedard
Copy link
Member Author

christophebedard commented Oct 10, 2024

Oh, looks like this repo aims to support Iron, Jazzy, and Rolling on the rolling branch. I will deal with that after a first round of review.

@christophebedard christophebedard force-pushed the christophebedard/add-tracing-instrumentation branch from c2d6771 to a1db0ea Compare November 17, 2024 23:09
@christophebedard
Copy link
Member Author

@Yadunund @clalancette any interest in having this?

@Yadunund
Copy link
Member

@christophebedard we'd love to have this! We're sort of freezing the rolling branch at the moment to focus effortts on getting the #276 merged before we add new features. So let's wait for that to get in before merging this PR . By then Iron would have ben sunsetted so we won't have to worry about failing Iron CI job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants