Class: Appsignal::CLI::Demo Private
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.
Command line tool for sending demonstration samples to AppSignal.com
This command line tool is useful when testing AppSignal on a system and validating the local configuration. It tests if the installation of AppSignal has succeeded and if the AppSignal agent is able to run on the machine's architecture and communicate with the AppSignal servers.
The same test is also run during installation with Install.
Exit codes
- Exits with status code
0
if the demo command has finished. - Exits with status code
1
if the demo command failed to finished.
Class Method Summary collapse
- .run(options = {}) ⇒ void private
Class Method Details
.run(options = {}) ⇒ void
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.
This method returns an undefined value.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/appsignal/cli/demo.rb', line 49 def run( = {}) ENV["APPSIGNAL_APP_ENV"] = [:environment] if [:environment] puts "Sending demonstration sample data..." if Appsignal::Demo.transmit puts "Demonstration sample data sent!" puts "It may take about a minute for the data to appear on https://appsignal.com/accounts" else puts "\nError: Unable to start the AppSignal agent and send data to AppSignal.com." puts "Please use the diagnose command (https://docs.appsignal.com/ruby/command-line/diagnose.html) to debug your configuration:" puts puts " bundle exec appsignal diagnose --environment=production" puts exit 1 end end |