Class: Gitlab::Usage::ServicePing::PayloadKeysProcessor
- Inherits:
-
Object
- Object
- Gitlab::Usage::ServicePing::PayloadKeysProcessor
- Defined in:
- lib/gitlab/usage/service_ping/payload_keys_processor.rb
Instance Attribute Summary collapse
-
#old_payload ⇒ Object
readonly
Returns the value of attribute old_payload.
Instance Method Summary collapse
-
#initialize(old_payload) ⇒ PayloadKeysProcessor
constructor
A new instance of PayloadKeysProcessor.
- #key_paths ⇒ Object
- #missing_instrumented_metrics_key_paths ⇒ Object
Constructor Details
#initialize(old_payload) ⇒ PayloadKeysProcessor
Returns a new instance of PayloadKeysProcessor.
11 12 13 |
# File 'lib/gitlab/usage/service_ping/payload_keys_processor.rb', line 11 def initialize(old_payload) @old_payload = old_payload end |
Instance Attribute Details
#old_payload ⇒ Object (readonly)
Returns the value of attribute old_payload.
9 10 11 |
# File 'lib/gitlab/usage/service_ping/payload_keys_processor.rb', line 9 def old_payload @old_payload end |
Instance Method Details
#key_paths ⇒ Object
15 16 17 |
# File 'lib/gitlab/usage/service_ping/payload_keys_processor.rb', line 15 def key_paths @key_paths ||= payload_keys.to_a.flatten.compact end |
#missing_instrumented_metrics_key_paths ⇒ Object
19 20 21 |
# File 'lib/gitlab/usage/service_ping/payload_keys_processor.rb', line 19 def missing_instrumented_metrics_key_paths @missing_key_paths ||= metrics_with_instrumentation.map(&:key) - key_paths end |