Module: Gitlab::Instrumentation::RedisPayload

Includes:
Utils::StrongMemoize
Included in:
Redis, RedisBase
Defined in:
lib/gitlab/instrumentation/redis_payload.rb

Instance Method Summary collapse

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Instance Method Details

#known_payload_keysObject

Fetches payload keys from the lazy payload (this avoids unnecessary processing of the values).


10
11
12
# File 'lib/gitlab/instrumentation/redis_payload.rb', line 10

def known_payload_keys
  to_lazy_payload.keys
end

#payloadObject


14
15
16
17
18
19
# File 'lib/gitlab/instrumentation/redis_payload.rb', line 14

def payload
  to_lazy_payload.transform_values do |value|
    result = value.call
    result if result > 0
  end.compact
end