- 1 Minute to read
- Print
- DarkLight
- PDF
Advanced Configuration
- 1 Minute to read
- Print
- DarkLight
- PDF
Ruby CLI Support
The Stackify Ruby Profiler can be used to track Ruby CLI applications.
General Configuration
Configuration is required to itemize which methods mark the start of a transaction.
Include a config/stackify.json
file in your application:
{
"instrumentation": [{
"class": "SampleClass1",
"method": "execute",
"transaction": true
}]
}
Rails Configuration
In the config/initializer
folder of your Rails app create config/initializer/stackify.rb
and then add this configuration:
Rails.configuration.to_prepare do
StackifyRubyAPM.run_custom_instrument
end
Non-Rails Configuration
Add StackifyRubyAPM.run_custom_instrument
to config.ru
Example:
use StackifyRubyAPM::Middleware
StackifyRubyAPM.start
StackifyRubyAPM.run_custom_instrument
at_exit { StackifyRubyAPM.stop }