Skip to content

Moesif/moesif-rack-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moesif Rack Example

Ruby Rack is the most popular Ruby Web frameworks.

Moesif is an API analytics and monitoring platform. moesif-rack is a middleware that makes integration with Moesif easy for Rack based applications and frameworks, including Rails.

This example is a Rack application with Moesif Rack integrated.

Key changes

moesif-rack's documentation has detailed installation instructions and configuration options. Key changes to the base example to enable Moesif:

  • Add gem 'moesif_rack', '~> 1.4.17' to the Gemfile
  • Modify the config/application.rb to use your Moesif Application Id.

Your Moesif Application Id can be found in the Moesif Portal. After signing up for a Moesif account, your Moesif Application Id will be displayed during the onboarding steps.

You can always find your Moesif Application Id at any time by logging into the Moesif Portal, click on the top right menu, and then clicking Installation.

How to run

  1. Verify Ruby version is 2.3 and above via ruby -v

  2. Install all dependencies via bundle install

  3. Be sure to edit the config/application.rb to change the application id to your real one obtained from Moesif.

# config/application.rb
moesif_options = {
  'application_id' => 'Your Moesif Application Id'
}
  1. To start the server
rackup
  1. See config.ru for some urls that you can hit the server with (e.g. http://localhost:9292/), and the data should be captured in the corresponding Moesif account of the application id.

About

Ruby Rack Application with Moesif Integrated

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages