Files
redux-scraper/config/application.rb
Dylan Knutson 13f078eb34 Add GoodJob metrics integration and update Prometheus configuration
- Introduced a new `GoodJobMetricsWithQueues` class for tracking GoodJob queue counts using Prometheus.
- Updated `application.rb` to include Prometheus exporter dependencies and configuration.
- Added a new `prometheus_exporter.yml` file to manage Prometheus settings across environments.
- Modified `puma.rb` to remove redundant Prometheus instrumentation code.
- Enabled eager loading in the development environment for better performance.
- Updated GoodJob initializer to start the new metrics tracking.

These changes enhance monitoring capabilities for job processing and improve application performance.
2025-01-04 07:23:08 +00:00

46 lines
1.5 KiB
Ruby

# typed: strict
require_relative "boot"
require "rails/all"
require "sorbet-runtime"
require "prometheus_exporter"
require "prometheus_exporter/client"
require "prometheus_exporter/metric"
require "prometheus_exporter/metric/counter"
require "prometheus_exporter/instrumentation"
require "prometheus_exporter/middleware"
module ReduxScraper
class Application < Rails::Application
config.active_support.deprecation = :raise
end
end
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module ReduxScraper
class Application < Rails::Application
config.session_store :cookie_store, key: "_refurrer_session"
config.assets.precompile << "good_job_custom.css"
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.0
config.autoload_paths << Rails.root.join("app/lib")
config.eager_load_paths << Rails.root.join("app/lib")
# all environments use good_job (in external execution mode)
config.active_job.queue_adapter = :good_job
# Configuration for the application, engines, and railties goes here.
#
# These settings can be overridden in specific environments using the files
# in config/environments, which are processed later.
#
config.time_zone = "Pacific Time (US & Canada)"
config.x.prometheus_exporter =
Rails.application.config_for("prometheus_exporter")
end
end