Skip to content

Draft: Facility to have rate-limited logs

Nick Mathewson requested to merge nickm/arti:tracing-ratelim into main

This is an attempt to address #1076 (closed) by adding a new crate to rate-limit a given log message. Its capabilities are somewhat based on a discussions we had on that ticket.

I am not totally satisfied with this; I feel like I have over-engineered some aspects and under-engineered others. I have my suspicions about which are which, but I bet that experience will show me that my suspicions were not all right. Please see the TODO comments throughout the new module for stuff that I currently think I want to clean up.

IMO this code will totally benefit from a round or two of review, but we probably won't have it fully right until we have some experience with using it in the rest of our codebase; if you agree, I'd like to suggest that we try to get it into a state where we think we're ready to get that practical experience, and then merge it.

Merge request reports

Loading