Install Autotuner for GC recommendations
This commit is contained in:
@@ -48,6 +48,7 @@ gem "yabeda-puma-plugin"
|
||||
gem "yabeda-rails"
|
||||
gem "webrick" # required for yabeda-prometheus metrics server
|
||||
gem "prometheus-client-mmap", "~> 1.1"
|
||||
gem "autotuner"
|
||||
|
||||
# AI
|
||||
gem "ruby_llm", git: "https://github.com/crmne/ruby_llm.git"
|
||||
|
||||
@@ -170,6 +170,7 @@ GEM
|
||||
anyway_config (2.7.2)
|
||||
ruby-next-core (~> 1.0)
|
||||
ast (2.4.3)
|
||||
autotuner (1.0.2)
|
||||
aws-eventstream (1.4.0)
|
||||
aws-partitions (1.1170.0)
|
||||
aws-sdk-core (3.233.0)
|
||||
@@ -606,6 +607,7 @@ PLATFORMS
|
||||
DEPENDENCIES
|
||||
activerecord-tenanted
|
||||
activeresource
|
||||
autotuner
|
||||
aws-sdk-s3
|
||||
bcrypt (~> 3.1.7)
|
||||
bootsnap
|
||||
|
||||
@@ -2,5 +2,7 @@
|
||||
|
||||
require_relative 'config/environment'
|
||||
|
||||
use Autotuner::RackPlugin
|
||||
|
||||
run Rails.application
|
||||
Rails.application.load_server
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Enable autotuner. Alternatively, call Autotuner.sample_ratio= with a value
|
||||
# between 0 and 1.0 to sample on a portion of instances.
|
||||
Autotuner.enabled = true
|
||||
|
||||
# This callback is called whenever a suggestion is provided by this gem.
|
||||
# You can output this report to your logging pipeline, stdout, a file,
|
||||
# or somewhere else!
|
||||
Autotuner.reporter = proc do |report|
|
||||
Rails.logger.info "GCAUTOTUNE: #{report}"
|
||||
Sentry.capture_message "Autotuner suggestion", level: :info, extra: { report: report.to_s }
|
||||
end
|
||||
|
||||
# # This (optional) callback is called to provide metrics that can give you
|
||||
# # insights about the performance of your app. It's recommended to send this
|
||||
# # data to your observability service (e.g. Datadog, Prometheus, New Relic, etc).
|
||||
# # Use a metric type that would allow you to calculate the average and percentiles.
|
||||
# # On Datadog this would be the distribution type. On Prometheus this would be
|
||||
# # the histogram type.
|
||||
# Autotuner.metrics_reporter = proc do |metrics|
|
||||
# # stats is a hash of metric name (string) to integer value.
|
||||
# metrics.each do |key, val|
|
||||
# StatsD.gauge(key, val)
|
||||
# end
|
||||
# end
|
||||
Reference in New Issue
Block a user