Skip to content

[ISSUE #8096]♻️Replace legacy logger setup in root examples#8097

Merged
mxsm merged 1 commit into
mainfrom
mxsm/root-examples-telemetry-bootstrap
Jul 6, 2026
Merged

[ISSUE #8096]♻️Replace legacy logger setup in root examples#8097
mxsm merged 1 commit into
mainfrom
mxsm/root-examples-telemetry-bootstrap

Conversation

@mxsm

@mxsm mxsm commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Which Issue(s) This PR Fixes(Closes)

Brief Description

This PR removes legacy logger bootstrap patterns from root workspace examples and routes them through the unified telemetry bootstrap.

Changes include:

  • Replace rocketmq_common::log::init_logger in root workspace client examples with rocketmq_observability::install_global.
  • Replace direct tracing_subscriber setup in controller and scheduler examples with the unified bootstrap.
  • Keep a telemetry runtime guard alive until normal example completion and explicitly shut it down.
  • Switch the rocketmq-rust example dev dependency from tracing-subscriber to rocketmq-observability.
  • Keep standalone rocketmq-example untouched because it is a separate project with its own validation boundary.

How Did You Test This Change?

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

@mxsm mxsm merged commit 8411393 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: 2 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: 22a87c1e-a868-49a4-8ff0-7f3c3990c9d1

📥 Commits

Reviewing files that changed from the base of the PR and between e799062 and 5e23b53.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (18)
  • rocketmq-client/examples/batch/callback_batch_producer.rs
  • rocketmq-client/examples/batch/simple_batch_producer.rs
  • rocketmq-client/examples/broadcast/push_consumer.rs
  • rocketmq-client/examples/consumer/pop_consumer.rs
  • rocketmq-client/examples/ordermessage/ordermessage_consumer.rs
  • rocketmq-client/examples/ordermessage/ordermessage_producer.rs
  • rocketmq-client/examples/quickstart/consumer.rs
  • rocketmq-client/examples/quickstart/producer.rs
  • rocketmq-client/examples/rpc/request_callback_producer.rs
  • rocketmq-client/examples/rpc/request_producer.rs
  • rocketmq-client/examples/transaction/transaction_producer.rs
  • rocketmq-controller/examples/controller_manager_basic.rs
  • rocketmq-controller/examples/controller_manager_cluster.rs
  • rocketmq-controller/examples/three_node_cluster.rs
  • rocketmq/Cargo.toml
  • rocketmq/examples/advanced_usage.rs
  • rocketmq/examples/basic_usage.rs
  • rocketmq/examples/basic_usage_more.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mxsm/root-examples-telemetry-bootstrap

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/root-examples-telemetry-bootstrap branch July 6, 2026 17:53
@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 refactor♻️ refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor♻️] Replace legacy logger setup in root examples

3 participants