Skip to content

feat(timestamp-stack): add routing timestamp instrumentation#731

Closed
YuanYuYuan wants to merge 12 commits into
eclipse-zenoh:mainfrom
YuanYuYuan:feat/routing-timestamps
Closed

feat(timestamp-stack): add routing timestamp instrumentation#731
YuanYuYuan wants to merge 12 commits into
eclipse-zenoh:mainfrom
YuanYuYuan:feat/routing-timestamps

Conversation

@YuanYuYuan
Copy link
Copy Markdown
Contributor

Summary

Python bindings for the opt-in timestamp instrumentation feature. Messages can carry a TsStack wire extension that accumulates Interception records 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.rsInterceptionPoint, TsStackContext, TimestampInstrumentation, TimestampStackRecord, TimestampStack, py_to_session_ts_callback
  • src/lib.rs — module registered, types exported
  • Sample::timestamp_stack(), Reply::timestamp_stack(), ReplyError::timestamp_stack() getters
  • session.put() / session.get()timestamp_instrumentation kwarg
  • session.declare_publisher()timestamp_instrumentation default kwarg
  • publisher.put()timestamp_instrumentation kwarg override
  • open()timestamp_callback kwarg
  • python/zenoh/__init__.pyi — stubs for all new types and kwargs
  • examples/z_timestamp_instrumentation.py — end-to-end usage example
  • tests/test_timestamp_stack.py — 10/10 passing

Breaking Changes

None. All new APIs are behind unstable feature.

YuanYuYuan added 12 commits June 1, 2026 11:08
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
@YuanYuYuan
Copy link
Copy Markdown
Contributor Author

Opened too early — using YuanYuYuan fork for diff review first.

@YuanYuYuan YuanYuYuan closed this Jun 2, 2026
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.

1 participant