@@ -41,7 +41,6 @@ pub struct CdnInvalidation {
4141 pub ( crate ) completed : bool ,
4242}
4343
44- #[ derive( Debug ) ]
4544pub enum CdnBackend {
4645 Dummy {
4746 invalidation_requests : Arc < Mutex < Vec < CdnInvalidation > > > ,
@@ -81,7 +80,7 @@ impl CdnBackend {
8180 ///
8281 /// Returns the caller reference that can be used to query the status of this
8382 /// invalidation request.
84- #[ instrument]
83+ #[ instrument( skip ( self ) ) ]
8584 async fn create_invalidation (
8685 & self ,
8786 distribution_id : & str ,
@@ -299,9 +298,8 @@ impl CdnBackend {
299298}
300299
301300/// fully invalidate the CDN distribution, also emptying the queue.
302- #[ instrument( skip ( conn ) ) ]
301+ #[ instrument( skip_all , fields ( distribution_id ) ) ]
303302pub ( crate ) async fn full_invalidation (
304- config : & Config ,
305303 cdn : & CdnBackend ,
306304 metrics : & InstanceMetrics ,
307305 conn : & mut sqlx:: PgConnection ,
@@ -356,7 +354,7 @@ pub(crate) async fn full_invalidation(
356354 Ok ( ( ) )
357355}
358356
359- #[ instrument( skip ( conn ) ) ]
357+ #[ instrument( skip_all , fields ( distribution_id ) ) ]
360358pub ( crate ) async fn handle_queued_invalidation_requests (
361359 config : & Config ,
362360 cdn : & CdnBackend ,
@@ -457,7 +455,7 @@ pub(crate) async fn handle_queued_invalidation_requests(
457455 . await ?
458456 {
459457 if ( now - min_queued) . to_std ( ) . unwrap_or_default ( ) >= config. cdn_max_queued_age {
460- full_invalidation ( config , cdn, metrics, conn, distribution_id) . await ?;
458+ full_invalidation ( cdn, metrics, conn, distribution_id) . await ?;
461459 return Ok ( ( ) ) ;
462460 }
463461 }
0 commit comments