Skip to content

Health monitoring (continues closed PR #915)#1203

Open
acul71 wants to merge 35 commits intolibp2p:mainfrom
acul71:feature/health-monitoring
Open

Health monitoring (continues closed PR #915)#1203
acul71 wants to merge 35 commits intolibp2p:mainfrom
acul71:feature/health-monitoring

Conversation

@acul71
Copy link
Copy Markdown
Contributor

@acul71 acul71 commented Feb 11, 2026

Implements #1121

Continuation of closed PR #915

This PR continues the health monitoring work from closed PR #915. Full credit to @bomanaps for the original implementation.

The author (bomanaps) implemented the modifications requested by @pacrob in her last commits but did not reply in the PR chat, so the review threads remained unresolved. This PR addresses those four points in code and docs:

  1. ConnectionConfig merge (libp2p/init.py)
    The list of attributes copied when merging connection_config into quic_transport_opt is now derived from dataclasses.fields(ConnectionConfig), so new fields (including critical_health_threshold) are never missed.

  2. critical_health_threshold
    Documented in a code comment that all ConnectionConfig attributes are merged when both configs are provided.

  3. Docs
    No "API consistency fixed!"-style artifact found; left as-is.

  4. Doc snippet clarity
    Added a sentence before the first "Basic Setup" code block stating that the following is a snippet and that the full runnable script is in examples/health_monitoring/basic_example.py.

Branch feature/health-monitoring is pushed to acul71/py-libp2p-fork and is ready for review.

Made with Cursor

bomanaps and others added 30 commits January 6, 2026 06:18
- Merge health monitoring methods with identify coordination methods
- Add missing imports (trio, weakref, protocol IDs, QUICConnection, etc.)
- Add _IdentifyNotifee class and protocol caching constants
- Update __init__ with identify coordination initialization and timeout detection
- Add helper methods: _detect_negotiate_timeout_from_transport, _schedule_identify, etc.
- Preserve all health monitoring functionality from PR branch
- All tests pass (1763), linting and type checking pass
Resolves merge conflict in docs/examples.rst by including both:
- TLS and AutoTLS example entries from main
- Health monitoring example entries from this branch

Co-authored-by: Cursor <cursoragent@cursor.com>
…c snippet clarity

- Derive connection_config_attrs from dataclasses.fields(ConnectionConfig) so
  new fields (including critical_health_threshold) are never missed when
  merging connection_config into quic_transport_opt.
- Add comment that all ConnectionConfig attributes are merged when both
  configs are provided.
- Add snippet clarification before first code block in connection health
  monitoring docs; point to examples/health_monitoring/basic_example.py.

Continues work from closed PR libp2p#915 (health monitoring). Credits bomanaps.

Co-authored-by: Cursor <cursoragent@cursor.com>
acul71 and others added 3 commits February 11, 2026 03:22
…rget

- run_demo.py: add CLI for limits, interval, monitor options; fix line length
- Prometheus/configure: use host.docker.internal, update configure.py patterns
- tests: add test_health_monitoring_run_demo.py under tests/examples
- README: validation steps, testing section
- docs: state current API only in connection_health_monitoring.rst
- config/monitor: minor validation and comment tweaks

Co-authored-by: Cursor <cursoragent@cursor.com>
@acul71 acul71 force-pushed the feature/health-monitoring branch from 3ffddad to c9d1972 Compare February 12, 2026 13:30
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.

3 participants