@@ -15,7 +15,7 @@ def cache_read(event)
15
15
if event . payload [ :hit ]
16
16
current_transaction . increment ( :cache_read_hit_count , 1 , false )
17
17
else
18
- self . metric_cache_misses_total . increment ( current_transaction . labels )
18
+ metric_cache_misses_total . increment ( current_transaction . labels )
19
19
current_transaction . increment ( :cache_read_miss_count , 1 , false )
20
20
end
21
21
end
@@ -41,14 +41,14 @@ def cache_fetch_hit(event)
41
41
def cache_generate ( event )
42
42
return unless current_transaction
43
43
44
- self . metric_cache_misses_total . increment ( current_transaction . labels )
44
+ metric_cache_misses_total . increment ( current_transaction . labels )
45
45
current_transaction . increment ( :cache_read_miss_count , 1 )
46
46
end
47
47
48
48
def observe ( key , duration )
49
49
return unless current_transaction
50
50
51
- self . metric_cache_operation_duration_seconds . observe ( current_transaction . labels . merge ( { operation : key } ) , duration / 1000.0 )
51
+ metric_cache_operation_duration_seconds . observe ( current_transaction . labels . merge ( { operation : key } ) , duration / 1000.0 )
52
52
current_transaction . increment ( :cache_duration , duration , false )
53
53
current_transaction . increment ( :cache_count , 1 , false )
54
54
current_transaction . increment ( "cache_#{ key } _duration" . to_sym , duration , false )
0 commit comments