class Appsignal::CLI::Demo

@api private
Debugging AppSignal guide
@see docs.appsignal.com/support/debugging.html<br>AppSignal demo documentation
@see docs.appsignal.com/ruby/command-line/demo.html<br>@see Appsignal::CLI::Install
@see Appsignal::Demo
@since 2.0.0
appsignal demo
export APPSIGNAL_PUSH_API_KEY=“xxxx-xxxx-xxxx-xxxx”
export APPSIGNAL_APP_ENV=“test”
export APPSIGNAL_APP_NAME=“My test app”
gem install appsignal
@example Standalone run
appsignal demo –environment=production
@example With a specific environment
appsignal demo
@example On the command line in your project
- Exits with status code ‘1` if the demo command failed to finished.
- Exits with status code `0` if the demo command has finished.
## Exit codes
{Appsignal::CLI::Install}.
The same test is also run during installation with
machine’s architecture and communicate with the AppSignal servers.
AppSignal has succeeded and if the AppSignal agent is able to run on the
validating the local configuration. It tests if the installation of
This command line tool is useful when testing AppSignal on a system and
Command line tool for sending demonstration samples to AppSignal.com

def run(options = {})

Returns:
  • (void) -

Options Hash: (**options)
  • :environment (String) -- environment to load

Parameters:
  • options (Hash) --
def run(options = {})
  ENV["APPSIGNAL_APP_ENV"] = options[:environment] if options[: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