Class: LiveQA::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/liveqa/message.rb

Overview

LiveQA Message

Return the base message for an event

Class Method Summary collapse

Class Method Details

.baseObject



9
10
11
12
13
14
15
# File 'lib/liveqa/message.rb', line 9

def base
  Util.deep_compact(
    message_id: SecureRandom.uuid,
    timestamp: Time.now.utc.iso8601(3),
    session_tracker_id: session_tracker_id,
  )
end

.extendedObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/liveqa/message.rb', line 17

def extended
  Util.deep_compact(
    library: library,
    server: server,
    request: LiveQA::Store.get(:request),
    worker: LiveQA::Store.get(:worker),
    environment: LiveQA::Store.get(:environment) || LiveQA.configurations.environment_name,
    metadata: 
  ).merge(base)
end