šHelp you get reading the huge open souce libraries in Ruby and trace its source locations
Ruby
269
183 commits
updated Jul 27, 2026
TraceLocation helps you trace the source location to ease reading huge open-source libraries in Ruby.
Add this line to your application's Gemfile:
gem 'trace_location'
And then execute:
$ bundle
Or install it yourself as:
$ gem install trace_location
config = Rails.application.config.database_configuration[Rails.env]
TraceLocation.trace do
# You just surround you want to track the process.
ActiveRecord::Base.establish_connection(config)
end
Then you can get logs like this: .md, .log, .csv
| name | content | example |
|---|---|---|
| format | :md, :log, :csv (default: :md) | :md |
| match | Regexp, Symbol, String or Array for allow list | [:activerecord, :activesupport] |
| ignore | Regexp, Symbol, String or Array for deny list | /bootsnap|activesupport/ |
| methods | Symbol or Array of method names | [:call] |
book = Book.new(title: "My Book Title")
TraceLocation.trace(match: /activerecord/) { book.validate }
env = Rack::MockRequest.env_for('http://localhost:3000/books')
TraceLocation.trace do
status, headers, body = Rails.application.call(env)
end
has_secure_password in User modelclass User < ApplicationRecord
# temporary surrounding with TraceLocation#trace
TraceLocation.trace(format: :md, ignore: /activesupport/) do
has_secure_password
end
class BooksController < ApplicationController
before_action :set_book, only: [:show, :update, :destroy]
# GET /books
def index
@books = Book.all
# temporary surrounding with TraceLocation#trace
TraceLocation.trace(format: :md, ignore: /activesupport|rbenv|concurrent-ruby/) do
render json: @books
end
end
508 followers Ā· starred Jun 2019
1,459 followers Ā· starred Jul 2019
218 followers Ā· starred May 2024
412 followers Ā· starred Jul 2019
šHelp you get reading the huge open souce libraries in Ruby and trace its source locations
Ruby
269
183 commits
updated Jul 27, 2026
TraceLocation helps you trace the source location to ease reading huge open-source libraries in Ruby.
Add this line to your application's Gemfile:
gem 'trace_location'
And then execute:
$ bundle
Or install it yourself as:
$ gem install trace_location
config = Rails.application.config.database_configuration[Rails.env]
TraceLocation.trace do
# You just surround you want to track the process.
ActiveRecord::Base.establish_connection(config)
end
Then you can get logs like this: .md, .log, .csv
| name | content | example |
|---|---|---|
| format | :md, :log, :csv (default: :md) | :md |
| match | Regexp, Symbol, String or Array for allow list | [:activerecord, :activesupport] |
| ignore | Regexp, Symbol, String or Array for deny list | /bootsnap|activesupport/ |
| methods | Symbol or Array of method names | [:call] |
book = Book.new(title: "My Book Title")
TraceLocation.trace(match: /activerecord/) { book.validate }
env = Rack::MockRequest.env_for('http://localhost:3000/books')
TraceLocation.trace do
status, headers, body = Rails.application.call(env)
end
has_secure_password in User modelclass User < ApplicationRecord
# temporary surrounding with TraceLocation#trace
TraceLocation.trace(format: :md, ignore: /activesupport/) do
has_secure_password
end
class BooksController < ApplicationController
before_action :set_book, only: [:show, :update, :destroy]
# GET /books
def index
@books = Book.all
# temporary surrounding with TraceLocation#trace
TraceLocation.trace(format: :md, ignore: /activesupport|rbenv|concurrent-ruby/) do
render json: @books
end
end
508 followers Ā· starred Jun 2019
1,459 followers Ā· starred Jul 2019
218 followers Ā· starred May 2024
412 followers Ā· starred Jul 2019