File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,8 +158,7 @@ mod buffer {
158158 let count = self
159159 . dropped_count
160160 . fetch_add ( 1 , std:: sync:: atomic:: Ordering :: Relaxed ) ;
161- // Log periodically to avoid log spam (every 100 drops)
162- if count. is_multiple_of ( 100 ) {
161+ if count == 0 || count. is_multiple_of ( 10 ) {
163162 tracing:: warn!(
164163 dropped_count = count + 1 ,
165164 max_pending = self . config. max_pending_entries,
@@ -210,6 +209,15 @@ mod buffer {
210209 if !batch. is_empty ( ) {
211210 buffer. flush_batch ( & sink, & mut batch) . await ;
212211 }
212+ let total_dropped = buffer
213+ . dropped_count
214+ . load ( std:: sync:: atomic:: Ordering :: Relaxed ) ;
215+ if total_dropped > 0 {
216+ tracing:: warn!(
217+ total_dropped,
218+ "Usage buffer dropped entries during lifetime"
219+ ) ;
220+ }
213221 tracing:: info!( "Usage log buffer worker shutting down" ) ;
214222 break ;
215223 }
You can’t perform that action at this time.
0 commit comments