Class: Appsignal::Demo Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Demo is a way to send demonstration / test samples for a exception and a performance issue.

Examples:

Loading config automatically

Appsignal::Demo.transmit

With custom config

# If another configuration should be used, set it beforehand.
Appsignal.config = Appsignal::Config.new(Dir.pwd, "production")
Appsignal::Demo.transmit

See Also:

Since:

  • 2.0.0

Defined Under Namespace

Classes: TestError

Class Method Summary collapse

Class Method Details

.transmitBoolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Starts AppSignal and transmits the demonstration samples to AppSignal using the loaded configuration.

Returns:

  • (Boolean)
    • returns false if Appsignal is not active.

Since:

  • 2.0.0



30
31
32
33
34
35
36
37
38
# File 'lib/appsignal/demo.rb', line 30

def transmit
  Appsignal.start
  Appsignal.start_logger
  return false unless Appsignal.active?

  create_example_error_request
  create_example_performance_request
  true
end