@@ -37,27 +37,36 @@ macro_rules! metrics {
37
37
$( #[ $meta] ) *
38
38
registry. register( Box :: new( $metric. clone( ) ) ) ?;
39
39
) *
40
+
41
+ let cdn_invalidation_time = prometheus:: HistogramVec :: new(
42
+ prometheus:: HistogramOpts :: new(
43
+ "cdn_invalidation_time" ,
44
+ "duration of CDN invalidations after having been sent to the CDN." ,
45
+ )
46
+ . namespace( $namespace)
47
+ . buckets( $crate:: metrics:: CDN_INVALIDATION_HISTOGRAM_BUCKETS . to_vec( ) )
48
+ . variable_label( "distribution" ) ,
49
+ & [ "distribution" ] ,
50
+ ) ?;
51
+ registry. register( Box :: new( cdn_invalidation_time. clone( ) ) ) ?;
52
+
53
+ let cdn_queue_time = prometheus:: HistogramVec :: new(
54
+ prometheus:: HistogramOpts :: new(
55
+ "cdn_queue_time" ,
56
+ "queue time of CDN invalidations before they are sent to the CDN. " ,
57
+ )
58
+ . namespace( $namespace)
59
+ . buckets( $crate:: metrics:: CDN_INVALIDATION_HISTOGRAM_BUCKETS . to_vec( ) )
60
+ . variable_label( "distribution" ) ,
61
+ & [ "distribution" ] ,
62
+ ) ?;
63
+ registry. register( Box :: new( cdn_queue_time. clone( ) ) ) ?;
64
+
40
65
Ok ( Self {
41
66
registry,
42
67
recently_accessed_releases: RecentlyAccessedReleases :: new( ) ,
43
- cdn_invalidation_time: prometheus:: HistogramVec :: new(
44
- prometheus:: HistogramOpts :: new(
45
- "cdn_invalidation_time" ,
46
- "duration of CDN invalidations after having been sent to the CDN." ,
47
- )
48
- . buckets( $crate:: metrics:: CDN_INVALIDATION_HISTOGRAM_BUCKETS . to_vec( ) )
49
- . variable_label( "distribution" ) ,
50
- & [ "distribution" ] ,
51
- ) ?,
52
- cdn_queue_time: prometheus:: HistogramVec :: new(
53
- prometheus:: HistogramOpts :: new(
54
- "cdn_queue_time" ,
55
- "queue time of CDN invalidations before they are sent to the CDN. " ,
56
- )
57
- . buckets( $crate:: metrics:: CDN_INVALIDATION_HISTOGRAM_BUCKETS . to_vec( ) )
58
- . variable_label( "distribution" ) ,
59
- & [ "distribution" ] ,
60
- ) ?,
68
+ cdn_invalidation_time,
69
+ cdn_queue_time,
61
70
$(
62
71
$( #[ $meta] ) *
63
72
$metric,
0 commit comments