feat(timestamp-stack): add routing timestamp instrumentation#731
Closed
YuanYuYuan wants to merge 12 commits into
Closed
feat(timestamp-stack): add routing timestamp instrumentation#731YuanYuYuan wants to merge 12 commits into
YuanYuYuan wants to merge 12 commits into
Conversation
Expose the full timestamp instrumentation API: - TimestampInstrumentation, TimestampStack, TimestampStackRecord, InterceptionPoint types - session.put/get/declare_publisher: timestamp_instrumentation kwarg - publisher.put: per-put override kwarg - Sample/Reply/ReplyError: timestamp_stack getter - open(): timestamp_callback kwarg for custom timestamps - Use path dep pointing at Rust routing-timestamps worktree - Integration tests in tests/test_timestamp_stack.py
…declare_publisher stubs
This was referenced Jun 2, 2026
Contributor
Author
|
Opened too early — using YuanYuYuan fork for diff review first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Python bindings for the opt-in timestamp instrumentation feature. Messages can carry a
TsStackwire extension that accumulatesInterceptionrecords at Send, Route, and Receive points along a message's path.Entirely
feature = "unstable"-gated. Zero overhead on uninstrumented messages.Sister PRs
Key Changes
src/timestamp_stack.rs—InterceptionPoint,TsStackContext,TimestampInstrumentation,TimestampStackRecord,TimestampStack,py_to_session_ts_callbacksrc/lib.rs— module registered, types exportedSample::timestamp_stack(),Reply::timestamp_stack(),ReplyError::timestamp_stack()getterssession.put()/session.get()—timestamp_instrumentationkwargsession.declare_publisher()—timestamp_instrumentationdefault kwargpublisher.put()—timestamp_instrumentationkwarg overrideopen()—timestamp_callbackkwargpython/zenoh/__init__.pyi— stubs for all new types and kwargsexamples/z_timestamp_instrumentation.py— end-to-end usage exampletests/test_timestamp_stack.py— 10/10 passingBreaking Changes
None. All new APIs are behind
unstablefeature.