Skip to content

Commit a691583

Browse files
committed
rename to railtie_disabled
1 parent a6584f2 commit a691583

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ After requiring the main file, you can further configure with:
4444
| client_custom_labels | A hash of custom labels to send with each client request | `{}` | None |
4545
| client_max_queue_size | The max amount of metrics to send before flushing | `10000` | `ENV['PROMETHEUS_CLIENT_MAX_QUEUE_SIZE']` |
4646
| client_thread_sleep | How often to sleep the worker thread that manages the client buffer (seconds) | `0.5` | `ENV['PROMETHEUS_CLIENT_THREAD_SLEEP']` |
47-
| disable_web_automatic_instrumentation | Opt out flag for Web instrumentation; use `Bigcommerce::Prometheus::Instrumentors::Web.new(app: Rails.application).start` in your app's code to start it up yourself | `0` | `ENV['PROMETHEUS_WEB_DISABLE_AUTOMATIC_INSTRUMENTATION']` |
4847
| puma_collection_frequency | How often to poll puma collection metrics (seconds) | `30` | `ENV['PROMETHEUS_PUMA_COLLECTION_FREQUENCY']` |
4948
| server_host | The host to run the exporter on | `"0.0.0.0"` | `ENV['PROMETHEUS_SERVER_HOST']` |
5049
| server_port | The port to run the exporter on | `9394` | `ENV['PROMETHEUS_SERVER_PORT']` |
5150
| server_thread_pool_size | The number of threads used for the exporter server | `3` | `ENV['PROMETHEUS_SERVER_THREAD_POOL_SIZE']` |
5251
| process_name | What the current process name is (used in logging) | `"unknown"` | `ENV['PROCESS']` |
52+
| railtie_disabled | Opt out flag for Railtie; use `Bigcommerce::Prometheus::Instrumentors::Web.new(app: Rails.application).start` in your app's code to start it up yourself | `0` | `ENV['PROMETHEUS_DISABLE_RAILTIE']` |
5353

5454
## Custom Collectors
5555

lib/bigcommerce/prometheus/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module Configuration
5454
web_type_collectors: [],
5555

5656
# Additional configuration
57-
web_disable_automatic_instrumentation: ENV.fetch('PROMETHEUS_WEB_DISABLE_AUTOMATIC_INSTRUMENTATION', 0).to_i.positive?
57+
railtie_disabled: ENV.fetch('PROMETHEUS_DISABLE_RAILTIE', 0).to_i.positive?
5858
}.freeze
5959

6060
attr_accessor *VALID_CONFIG_KEYS.keys

lib/bigcommerce/prometheus/integrations/railtie.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module Integrations
2323
#
2424
class Railtie < ::Rails::Railtie
2525
initializer 'zzz.bc_prometheus_ruby.configure_rails_initialization' do |app|
26-
Bigcommerce::Prometheus::Instrumentors::Web.new(app: app).start unless ::Bigcommerce::Prometheus.web_disable_automatic_instrumentation
26+
Bigcommerce::Prometheus::Instrumentors::Web.new(app: app).start unless ::Bigcommerce::Prometheus.railtie_disabled
2727
end
2828
end
2929
end

0 commit comments

Comments
 (0)