#46 Add Prometheus exporter

This commit is contained in:
Tobias Kantusch
2021-02-18 18:02:56 +01:00
committed by Sebastian Serth
parent 39fcd255f9
commit 44b32b6f6a
26 changed files with 2121 additions and 45 deletions

View File

@ -1,24 +1,26 @@
# frozen_string_literal: true
Rails.application.configure do
# Verifies that versions and hashed value of the package contents in the project's package.json
config.webpacker.check_yarn_integrity = true
# Settings specified here will take precedence over those in config/application.rb.
config.web_console.whitelisted_ips = '192.168.0.0/16'
config.web_console.whitelisted_ips = '192.168.0.0/16'
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Do not eager load code on boot.
config.eager_load = false
# Eager load code for prometheus exporter
config.eager_load = true
# Show full error reports.
config.consider_all_requests_local = true
# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join('tmp', 'caching-dev.txt').exist?
if Rails.root.join('tmp/caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.cache_store = :memory_store

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
Rails.application.configure do
# Verifies that versions and hashed value of the package contents in the project's package.json
config.webpacker.check_yarn_integrity = false
@ -10,6 +12,7 @@ Rails.application.configure do
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
# Eager load is also required for the prometheus exporter
config.eager_load = true
# Full error reports are disabled and caching is turned on.
@ -90,8 +93,8 @@ Rails.application.configure do
# require 'syslog/logger'
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT)
if ENV['RAILS_LOG_TO_STDOUT'].present?
logger = ActiveSupport::Logger.new($stdout)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
@ -11,9 +13,10 @@ Rails.application.configure do
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = false
# Eager load code for prometheus exporter
config.eager_load = true
#enable web console in staging
# enable web console in staging
config.web_console.development_only = false
# Show full error reports and disable caching.

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
@ -10,7 +12,8 @@ Rails.application.configure do
# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
# Eager load code for prometheus exporter
config.eager_load = true
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
@ -47,7 +50,7 @@ Rails.application.configure do
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
#config.logger = Logger.new(STDOUT)
# config.logger = Logger.new($stdout)
# Set log level
#config.log_level = :DEBUG
# config.log_level = :DEBUG
end