APM Inisight using Ruby on Rails
Site24x7 APM Insight Ruby agent deployed on a Rails platform gives you end-to-end web-transaction awareness enabling you to isolate performance issues and resolve them quickly. Site24x7 requires a monitoring agent (ruby gem) to be deployed in your application server to monitor Ruby application performance. Download the latest Ruby Agent and deploy it in your application server. The agent collects application performance metrics and sends it to the central Site24x7 server at fixed intervals i.e. every 60 seconds.
Supported Environments:
- Ruby - 1.8.7 and higher
- Rails - 3.0 and higher
How Can I...
Install APM Insight Ruby On Rails Agent
- Select APM > APM Insight tab.
- Click on Ruby tab to download the file.
- Click Download to deploy the agent into your application server.
- Ruby Agent installation can be done in two ways:
Configure the Agent
- For each of your applications, add the following line to the application gemfile:
gem 'site24x7_apminsight'
(or)
- For each of your applications, add the following line to the application initializer block:
require 'site24x7_apminsight'
- A copy of the configuration file apminsight.conf will be available in the <Gem Installed folder> /site24x7_apminsight/conf/. Copy the file into your application home.
- The following configuration options are mandatory and should be provided for the agent to be initialized:
application.name - The application's name to be displayed in Site24x7.
license.key - license api key from Site24x7 APM Insight home page after successful login
agent.server.port - The HTTP listening port of the Application Server.
To check if the agent is installed correctly, use the command gem list. This command will list all the installed gem in the machine. Check if the site24x7_apminsight gem file is included in the list.
APM Insight Agent Configuration
- Refer here to know more configuration options for APM Insight Ruby Agent.
Tracking Background Transaction
- To configure settings for background transaction, refer here.
Grouping Similar Transaction
Dynamic Transaction names are becoming more familiar with lots of applications, making it difficult to actually track the performance of the application. Dynamic transactions are web transactions within an application having single URL but get appended with unique alpha numeric identifiers every time they are invoked, making the web transaction name itself look different. Tracking such individual URLs is a herculean task. Here, this feature of grouping similar transactions, will help to group these dynamic transactions into the actual URL that needs to be monitored.
Configuration Steps for Ruby Agent
- Create a new file named "transaction_merge_patterns.conf" in the directory where apminsight.conf file resides in your application.
- Open the file in any text editor and specify key value pairs as per syntax given below
Regular expression of URLs=new_name_to_be_assigned
- Start or restart the rails server, all transactions performed from now, will use the above defined patterns to merge the transactions.
Example:
ruby/shop/item/laptops/.*=shop/laptops
ruby/shop/item/.*/dell/.*=shop/item/dell
.*/cart/purchase=shop/purchase