Class: Clerk::Models::Components::FirstEvent

Inherits:
Object
  • Object
show all
Includes:
Crystalline::MetadataFields
Defined in:
lib/clerk/models/components/first_event.rb

Overview

The group's first log, even when event filters left it out of events, for showing how the flow started (subject, IP, location).

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(object:, id:, event_time:, actor:, subject:, type:, trace_id:, span_id:, event_context:, actor_type: nil, source: nil, payload: nil, impersonator: nil, client_id: nil, session_id: nil, parent_span_id: nil, group_id: nil, group_type: nil, group_started_at: nil) ⇒ FirstEvent

Returns a new instance of FirstEvent.



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/clerk/models/components/first_event.rb', line 66

def initialize(object:, id:, event_time:, actor:, subject:, type:, trace_id:, span_id:, event_context:, actor_type: nil, source: nil, payload: nil, impersonator: nil, client_id: nil, session_id: nil, parent_span_id: nil, group_id: nil, group_type: nil, group_started_at: nil)
  @object = object
  @id = id
  @event_time = event_time
  @actor = actor
  @subject = subject
  @type = type
  @trace_id = trace_id
  @span_id = span_id
  @event_context = event_context
  @actor_type = actor_type
  @source = source
  @payload = payload
  @impersonator = impersonator
  @client_id = client_id
  @session_id = session_id
  @parent_span_id = parent_span_id
  @group_id = group_id
  @group_type = group_type
  @group_started_at = group_started_at
end

Instance Method Details

#==(other) ⇒ Object



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/clerk/models/components/first_event.rb', line 89

def ==(other)
  return false unless other.is_a? self.class
  return false unless @object == other.object
  return false unless @id == other.id
  return false unless @event_time == other.event_time
  return false unless @actor == other.actor
  return false unless @subject == other.subject
  return false unless @type == other.type
  return false unless @trace_id == other.trace_id
  return false unless @span_id == other.span_id
  return false unless @event_context == other.event_context
  return false unless @actor_type == other.actor_type
  return false unless @source == other.source
  return false unless @payload == other.payload
  return false unless @impersonator == other.impersonator
  return false unless @client_id == other.client_id
  return false unless @session_id == other.session_id
  return false unless @parent_span_id == other.parent_span_id
  return false unless @group_id == other.group_id
  return false unless @group_type == other.group_type
  return false unless @group_started_at == other.group_started_at
  true
end