# EPF5 Dev Update - Week 14 ## Weekly Highlights Attended EPF5 weekly standup, office hours, and our in-house meeting which happens three times a week (Monday, Wednesday, and Friday). This week started off smoothly, or so I thought, but I ran into several unexpected errors. For some reason, I wasn't seeing the tracing logs I had implemented. As a result, I decided to step back and undo the changes I had made, thinking it would be easier to debug if I approached it bit by bit rather than dealing with a large chunk of commits. To troubleshoot the tracing logs I implemented, I began by focusing on the metrics folder, starting with the server.rs file. ## Tracing attributed i added and why I added `skip` attribute to `#[tracing::instrument]` macro because I needed to exclude specific parameters from being logged by the tracing instrumentation. Passing several parameters that are either large or complex types, such as: `config: MetricsServerConfig` `controller: ApiController<P, W>` `libp2p_registry: Option<Registry>` `metrics: Arc<Metrics>` `metrics_to_metrics_tx: Option<UnboundedSender<MetricsToMetrics>>` `network_globals: Arc<NetworkGlobals>` These types are generally data structures that either hold a significant amount of information or are references managed by smart pointers (such as Arc or Option). Logging the full content of these complex structures could introduce overhead, clutter the logs, and may not offer useful insights for every function call. ### Key takeways I learnt while using the `skip` attribute: 1. Avoid logging large or complex structures. 2. Improve performance. 3. Enhance log readability. Before starting this, I ran it in a dummy codebase that I created to see how it would play out. However, I was still unable to view some of the logs I had implemented. So far, I've attempted to debug it by taking the following steps: * Ensure Tracing is Properly Initialized which includes the necessary log level and subscriber settings to capture the logs. * Checked If Tracing Statements are Reached. * Verified Log Level and Environment. * Checked the Log Target. * Log Destination. * Confirmed the Logs are Reached by Adding Basic Output. I aslo added some basic non-tracing debug outputs (like `println!()`) to see the execution reaches the relevant parts of the code. So far, these are the steps I've taken to debug the issue. Further steps I plan to take include: 1. Generating a code coverage report to gain more insight into what's actually happening (This will be hard). 2. Building a Docker image after updating the code and running it as a node. ### Side Note regarding this changes Not all branches will be executed because some handle errors that may or may not occur in the near future.