Class: CloseYourIt::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/closeyourit/event.rb

Overview

Base degli eventi di telemetria. Le sottoclassi implementano ‘#to_h` e `#ingest_path` (il path API a cui l’evento va spedito: errori → /events, metriche → /metrics).

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ Event

Returns a new instance of Event.



10
11
12
13
# File 'lib/closeyourit/event.rb', line 10

def initialize(configuration)
  @configuration = configuration
  @occurred_at = Time.now.utc.iso8601
end

Instance Method Details

#ingest_path(_project_id) ⇒ Object

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/closeyourit/event.rb', line 19

def ingest_path(_project_id)
  raise NotImplementedError, "#{self.class} deve implementare #ingest_path"
end

#to_hObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/closeyourit/event.rb', line 15

def to_h
  raise NotImplementedError, "#{self.class} deve implementare #to_h"
end