Skip to content

Add update op to network monitor #1578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

netsirius
Copy link
Collaborator

This pull request introduces a significant update to the Update operation 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

  • Added sender and key fields to various structs and messages in the UpdateOp implementation 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

  • Introduced a new UpdateEvent enum to represent various stages of the update process (e.g., request, success, broadcast emitted/received) and integrated it into the EventKind enum for better observability (crates/core/src/tracing/mod.rs). [1] [2]
  • Enhanced the send_to_metrics_server function to handle UpdateEvent types, enabling detailed logging and metrics reporting for update-related activities (crates/core/src/tracing/mod.rs).

Metrics Server Enhancements

  • Extended the Change enum in the metrics server to include UpdateRequest, UpdateSuccess, and UpdateFailure variants for tracking update operations. Corresponding handling logic was added to the pull_interface function (crates/fdev/src/network_metrics_server.rs). [1] [2] [3]
  • Improved error handling in the metrics server by replacing unreachable code with descriptive error logs, ensuring better debugging and maintainability (crates/fdev/src/network_metrics_server.rs). [1] [2] [3]

Dependency and Version Updates

  • Updated the freenet dependency version from 0.1.2 to 0.1.3 in Cargo.toml to align with the new changes (crates/fdev/Cargo.toml).

Minor Adjustments

  • Adjusted the range for log file types in impl LogFile to accommodate the new Update event 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.

@netsirius netsirius requested a review from iduartgomez May 4, 2025 18:48
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