Skip to content

[ISSUE #8092]♻️Structure hot path log fields for RocketMQ services#8093

Merged
mxsm merged 1 commit into
mainfrom
mxsm/structured-logging-hotpaths
Jul 6, 2026
Merged

[ISSUE #8092]♻️Structure hot path log fields for RocketMQ services#8093
mxsm merged 1 commit into
mainfrom
mxsm/structured-logging-hotpaths

Conversation

@mxsm

@mxsm mxsm commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Which Issue(s) This PR Fixes(Closes)

Brief Description

This PR converts selected high-value runtime logs from formatted strings into structured tracing fields.

Changes include:

  • Add structured file_name and error fields for mapped file delete and memory lock failures.
  • Add remote_addr, elapsed_ms, timeout_ms, and error fields for remoting request and oneway send paths.
  • Add topic and elapsed_ms fields for slow producer send request preparation.
  • Add topic, timeout_ms, and error fields for lite pull consumer unsubscribe and poll failures.
  • Keep existing log levels, behavior, and control flow unchanged while avoiding eager string formatting.

How Did You Test This Change?

  • cargo fmt --all passed.
  • cargo test -p rocketmq-store --lib passed.
  • cargo test -p rocketmq-remoting --lib passed.
  • cargo test -p rocketmq-client-rust --lib passed.
  • cargo clippy --workspace --no-deps --all-targets --all-features -- -D warnings passed.

@mxsm mxsm merged commit 850c382 into main Jul 6, 2026
7 of 9 checks passed
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@mxsm, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 16 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c1efb968-5c04-44dd-b9e0-bdf200eaa91a

📥 Commits

Reviewing files that changed from the base of the PR and between 673d1a9 and afcbcb7.

📒 Files selected for processing (4)
  • rocketmq-client/src/consumer/default_lite_pull_consumer.rs
  • rocketmq-client/src/producer/producer_impl/default_mq_producer_impl.rs
  • rocketmq-remoting/src/clients/rocketmq_tokio_client.rs
  • rocketmq-store/src/log_file/mapped_file/default_mapped_file_impl.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mxsm/structured-logging-hotpaths

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mxsm mxsm deleted the mxsm/structured-logging-hotpaths branch July 6, 2026 17:38
@rocketmq-rust-bot rocketmq-rust-bot added the approved PR has approved label Jul 6, 2026
@rocketmq-rust-bot

Copy link
Copy Markdown
Collaborator

🔊@mxsm 🚀Thanks for your contribution🎉!

💡CodeRabbit(AI) will review your code first🔥!

Note

🚨The code review suggestions from CodeRabbit are to be used as a reference only, and the PR submitter can decide whether to make changes based on their own judgment. Ultimately, the project management personnel will conduct the final code review💥.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI review first Ai review pr first approved PR has approved auto merge ready to review refactor♻️ refactor code waiting-review waiting review this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor♻️] Structure hot path log fields for RocketMQ services

3 participants