mirror of
https://github.com/mastodon/mastodon.git
synced 2025-07-15 08:48:15 +00:00
Added check for STATSD_ADDR setting to emit a warning and proceed rather than crashing if the address is unreachable (#30691)
Some checks failed
Ruby Linting / lint (push) Waiting to run
Test one step migrations / pre_job (push) Waiting to run
Test one step migrations / test (14-alpine) (push) Blocked by required conditions
Test one step migrations / test (15-alpine) (push) Blocked by required conditions
Test two step migrations / pre_job (push) Waiting to run
Test two step migrations / test (14-alpine) (push) Blocked by required conditions
Test two step migrations / test (15-alpine) (push) Blocked by required conditions
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (1, .ruby-version) (push) Blocked by required conditions
Ruby Testing / test (1, 3.0) (push) Blocked by required conditions
Ruby Testing / test (1, 3.1) (push) Blocked by required conditions
Ruby Testing / test (2, .ruby-version) (push) Blocked by required conditions
Ruby Testing / test (2, 3.0) (push) Blocked by required conditions
Ruby Testing / test (2, 3.1) (push) Blocked by required conditions
Ruby Testing / test (3, .ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3, 3.0) (push) Blocked by required conditions
Ruby Testing / test (3, 3.1) (push) Blocked by required conditions
Ruby Testing / test (4, .ruby-version) (push) Blocked by required conditions
Ruby Testing / test (4, 3.0) (push) Blocked by required conditions
Ruby Testing / test (4, 3.1) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.0) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.1) (push) Blocked by required conditions
Ruby Testing / Testing search (.ruby-version) (push) Blocked by required conditions
Ruby Testing / Testing search (3.0) (push) Blocked by required conditions
Ruby Testing / Testing search (3.1) (push) Blocked by required conditions
Bundler Audit / security (push) Has been cancelled
CSS Linting / lint (push) Has been cancelled
Haml Linting / lint (push) Has been cancelled
JavaScript Linting / lint (push) Has been cancelled
JSON Linting / lint (push) Has been cancelled
Markdown Linting / lint (push) Has been cancelled
YML Linting / lint (push) Has been cancelled
JavaScript Testing / test (push) Has been cancelled
Some checks failed
Ruby Linting / lint (push) Waiting to run
Test one step migrations / pre_job (push) Waiting to run
Test one step migrations / test (14-alpine) (push) Blocked by required conditions
Test one step migrations / test (15-alpine) (push) Blocked by required conditions
Test two step migrations / pre_job (push) Waiting to run
Test two step migrations / test (14-alpine) (push) Blocked by required conditions
Test two step migrations / test (15-alpine) (push) Blocked by required conditions
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (1, .ruby-version) (push) Blocked by required conditions
Ruby Testing / test (1, 3.0) (push) Blocked by required conditions
Ruby Testing / test (1, 3.1) (push) Blocked by required conditions
Ruby Testing / test (2, .ruby-version) (push) Blocked by required conditions
Ruby Testing / test (2, 3.0) (push) Blocked by required conditions
Ruby Testing / test (2, 3.1) (push) Blocked by required conditions
Ruby Testing / test (3, .ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3, 3.0) (push) Blocked by required conditions
Ruby Testing / test (3, 3.1) (push) Blocked by required conditions
Ruby Testing / test (4, .ruby-version) (push) Blocked by required conditions
Ruby Testing / test (4, 3.0) (push) Blocked by required conditions
Ruby Testing / test (4, 3.1) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.0) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.1) (push) Blocked by required conditions
Ruby Testing / Testing search (.ruby-version) (push) Blocked by required conditions
Ruby Testing / Testing search (3.0) (push) Blocked by required conditions
Ruby Testing / Testing search (3.1) (push) Blocked by required conditions
Bundler Audit / security (push) Has been cancelled
CSS Linting / lint (push) Has been cancelled
Haml Linting / lint (push) Has been cancelled
JavaScript Linting / lint (push) Has been cancelled
JSON Linting / lint (push) Has been cancelled
Markdown Linting / lint (push) Has been cancelled
YML Linting / lint (push) Has been cancelled
JavaScript Testing / test (push) Has been cancelled
This commit is contained in:
parent
1e87634a43
commit
17f69c0002
|
@ -3,13 +3,17 @@
|
|||
if ENV['STATSD_ADDR'].present?
|
||||
host, port = ENV['STATSD_ADDR'].split(':')
|
||||
|
||||
statsd = Statsd.new(host, port)
|
||||
statsd.namespace = ENV.fetch('STATSD_NAMESPACE') { ['Mastodon', Rails.env].join('.') }
|
||||
begin
|
||||
statsd = Statsd.new(host, port)
|
||||
statsd.namespace = ENV.fetch('STATSD_NAMESPACE') { ['Mastodon', Rails.env].join('.') }
|
||||
|
||||
NSA.inform_statsd(statsd) do |informant|
|
||||
informant.collect(:action_controller, :web)
|
||||
informant.collect(:active_record, :db)
|
||||
informant.collect(:active_support_cache, :cache)
|
||||
informant.collect(:sidekiq, :sidekiq) if ENV['STATSD_SIDEKIQ'] == 'true'
|
||||
NSA.inform_statsd(statsd) do |informant|
|
||||
informant.collect(:action_controller, :web)
|
||||
informant.collect(:active_record, :db)
|
||||
informant.collect(:active_support_cache, :cache)
|
||||
informant.collect(:sidekiq, :sidekiq) if ENV['STATSD_SIDEKIQ'] == 'true'
|
||||
end
|
||||
rescue
|
||||
Rails.logger.warn("statsd address #{ENV['STATSD_ADDR']} not reachable, proceeding without statsd")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user