Health monitoring (continues closed PR #915)#1203
Open
acul71 wants to merge 35 commits intolibp2p:mainfrom
Open
Health monitoring (continues closed PR #915)#1203acul71 wants to merge 35 commits intolibp2p:mainfrom
acul71 wants to merge 35 commits intolibp2p:mainfrom
Conversation
- 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>
…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>
3ffddad to
c9d1972
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
ConnectionConfig merge (libp2p/init.py)
The list of attributes copied when merging
connection_configintoquic_transport_optis now derived fromdataclasses.fields(ConnectionConfig), so new fields (includingcritical_health_threshold) are never missed.critical_health_threshold
Documented in a code comment that all
ConnectionConfigattributes are merged when both configs are provided.Docs
No "API consistency fixed!"-style artifact found; left as-is.
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-monitoringis pushed toacul71/py-libp2p-forkand is ready for review.Made with Cursor