Class: Gitlab::Instrumentation::Redis

Inherits:
Object
  • Object
show all
Extended by:
RedisPayload
Defined in:
lib/gitlab/instrumentation/redis.rb

Overview

Aggregates Redis measurements from different request storage sources.

Constant Summary collapse

ActionCable =
Class.new(RedisBase)
Cache =
Class.new(RedisBase).enable_redis_cluster_validation
Queues =
Class.new(RedisBase)
SharedState =
Class.new(RedisBase).enable_redis_cluster_validation
TraceChunks =
Class.new(RedisBase).enable_redis_cluster_validation
RateLimiting =
Class.new(RedisBase).enable_redis_cluster_validation
Sessions =
Class.new(RedisBase).enable_redis_cluster_validation
STORAGES =
[ActionCable, Cache, Queues, SharedState, TraceChunks, RateLimiting, Sessions].freeze
QUERY_TIME_BUCKETS =

Milliseconds represented in seconds (from 1 millisecond to 2 seconds).

[0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2].freeze

Class Method Summary collapse

Methods included from RedisPayload

payload

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Class Method Details

.detail_storeObject


31
32
33
34
35
# File 'lib/gitlab/instrumentation/redis.rb', line 31

def detail_store
  STORAGES.flat_map do |storage|
    storage.detail_store.map { |details| details.merge(storage: storage.name.demodulize) }
  end
end

.payloadObject


27
28
29
# File 'lib/gitlab/instrumentation/redis.rb', line 27

def payload
  super.merge(*STORAGES.flat_map(&:payload))
end

.storage_keyObject


23
24
25
# File 'lib/gitlab/instrumentation/redis.rb', line 23

def storage_key
  nil
end