Skip to content

chore: update quickstart to be more accurate#78

Open
okdistribute wants to merge 2 commits intomainfrom
rae/name-example
Open

chore: update quickstart to be more accurate#78
okdistribute wants to merge 2 commits intomainfrom
rae/name-example

Conversation

@okdistribute
Copy link
Copy Markdown
Contributor

@okdistribute okdistribute commented Apr 14, 2026

Description

  • Use tracing subscriber
  • Wait for endpoint to be online
  • Set a name for the endpoint

Breaking Changes

None

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

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

@okdistribute okdistribute changed the title Update quickstart to be more accurate chore: update quickstart to be more accurate Apr 15, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_subscriber in the quickstart example.
  • Wait for the endpoint to be online and set an explicit endpoint name on the Client builder.
  • 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.

Comment thread examples/quickstart.rs
Comment on lines +10 to +12
// Wait for the endpoint to be online
endpoint.online().await;

Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
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.

2 participants