Class: Watchforge::Transport

Inherits:
Object
  • Object
show all
Defined in:
lib/watchforge/transport.rb

Instance Method Summary collapse

Constructor Details

#initialize(dsn, debug: false) ⇒ Transport

Returns a new instance of Transport.



9
10
11
12
13
# File 'lib/watchforge/transport.rb', line 9

def initialize(dsn, debug: false)
  @dsn = dsn
  @parsed = DSN.parse(dsn)
  @debug = debug
end

Instance Method Details

#send_event(payload) ⇒ Object



15
16
17
# File 'lib/watchforge/transport.rb', line 15

def send_event(payload)
  post(@parsed.events_url, payload)
end

#send_monitor_check_in(payload) ⇒ Object



23
24
25
# File 'lib/watchforge/transport.rb', line 23

def send_monitor_check_in(payload)
  post(@parsed.monitor_url, payload)
end

#send_trace(payload) ⇒ Object



19
20
21
# File 'lib/watchforge/transport.rb', line 19

def send_trace(payload)
  post(@parsed.trace_url, payload)
end