Add update op to network monitor #1578
Merged
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.
This pull request introduces a significant update to the
Updateoperation in the system, including enhancements to the message handling, event logging, and metrics reporting. The changes primarily focus on adding support for tracking and broadcasting updates, improving observability, and refining error handling. Below is a summary of the most important changes grouped by theme:Enhancements to Update Operation
senderandkeyfields to various structs and messages in theUpdateOpimplementation to improve traceability and ensure consistent data propagation across the update lifecycle (crates/core/src/operations/update.rs). [1] [2] [3] [4] [5] [6] [7]Event Logging and Tracing Improvements
UpdateEventenum to represent various stages of the update process (e.g., request, success, broadcast emitted/received) and integrated it into theEventKindenum for better observability (crates/core/src/tracing/mod.rs). [1] [2]send_to_metrics_serverfunction to handleUpdateEventtypes, enabling detailed logging and metrics reporting for update-related activities (crates/core/src/tracing/mod.rs).Metrics Server Enhancements
Changeenum in the metrics server to includeUpdateRequest,UpdateSuccess, andUpdateFailurevariants for tracking update operations. Corresponding handling logic was added to thepull_interfacefunction (crates/fdev/src/network_metrics_server.rs). [1] [2] [3]crates/fdev/src/network_metrics_server.rs). [1] [2] [3]Dependency and Version Updates
freenetdependency version from0.1.2to0.1.3inCargo.tomlto align with the new changes (crates/fdev/Cargo.toml).Minor Adjustments
impl LogFileto accommodate the newUpdateevent type (crates/core/src/tracing/aof.rs).These changes collectively enhance the system's ability to handle updates, improve observability, and ensure robust error handling, paving the way for more reliable and maintainable operations.