Backend: Error Monitoring
Backend: Logging
Go
JS
Python
Ruby
Java
Rust
Hosting Providers
Backend: Tracing
Native OpenTelemetry
Fullstack Frameworks
Overview
Self Host & Local Dev
Menu
Rails
Learn how to set up highlight.io Rails log ingestion.
1
Set up your frontend highlight.io integration.
First, make sure you've followed the frontend getting started guide.
2
Set up the Highlight Logger.
In a Rails initializer, you can replace or extend your logger with the Highlight Logger.
require "highlight"
Highlight.init("<YOUR_PROJECT_ID>", environment: "production") do |c|
c.service_name = "my-rails-app"
c.service_version = "git-sha"
end
# you can replace the Rails.logger with Highlight's
Rails.logger = Highlight::Logger.new(STDOUT)
# or broadcast logs to Highlight's logger
highlight_logger = Highlight::Logger.new(nil)
Rails.logger.broadcast_to(highlight_logger)
# or if using an older version of Rails, you can extend the logger
Rails.logger.extend(ActiveSupport::Logger.broadcast(highlight_logger))
3
Verify your backend logs are being recorded.
Visit the highlight logs portal and check that backend logs are coming in.