Class: Appsignal::CustomMarker

Inherits:
Object
  • Object
show all
Defined in:
lib/appsignal/custom_marker.rb

Overview

Custom markers are used on AppSignal.com to indicate events in an application, to give additional context on graph timelines.

This helper class will send a request to the AppSignal public endpoint to create a Custom marker for the application on AppSignal.com.

Class Method Summary collapse

Class Method Details

.report(icon: nil, message: nil, created_at: nil) ⇒ Boolean



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/appsignal/custom_marker.rb', line 21

def self.report(
  icon: nil,
  message: nil,
  created_at: nil
)
  new(
    {
      :icon => icon,
      :message => message,
      :created_at => created_at.respond_to?(:iso8601) ? created_at.iso8601 : created_at
    }.compact
  ).transmit
end