chore: update quickstart to be more accurate#78
Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh-services/pr/78/docs/iroh_services/ Last updated: 2026-04-15T00:03:31Z |
There was a problem hiding this comment.
Pull request overview
Updates the Rust quickstart example to better reflect a realistic client setup when connecting an iroh::Endpoint to iroh-services, including logging/tracing and keeping the process alive to continue pushing metrics.
Changes:
- Initialize
tracing_subscriberin the quickstart example. - Wait for the endpoint to be online and set an explicit endpoint name on the
Clientbuilder. - Keep the example running until Ctrl+C, then close the endpoint.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/quickstart.rs | Improves the quickstart flow (tracing init, online wait, endpoint naming, and long-running behavior). |
| Cargo.lock | Updates rand to a newer patch version as part of dependency resolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Wait for the endpoint to be online | ||
| endpoint.online().await; | ||
|
|
There was a problem hiding this comment.
endpoint.online().await can block indefinitely if the endpoint never establishes a relay connection (e.g., offline network). Elsewhere (e.g. src/net_diagnostics.rs) this wait is wrapped in tokio::time::timeout with a warning; consider doing the same here (or otherwise bounding the wait) so the quickstart doesn’t hang without feedback.
Description
Breaking Changes
None
Change checklist