Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check for STATSD_ADDR setting to emit a warning and proceed rather than crashing if the address is unreachable #30691

Merged

Conversation

timothyjrogers
Copy link
Contributor

@timothyjrogers timothyjrogers commented Jun 13, 2024

Fixes #30622

The code that initializes statsd fatally crashes if the value of STATSD_ADDR is not a resolvable name/address. This change rescues that exception and instead emits it as a warning, since statsd is an optional configuration.

…her than crashing if the address is unreachable
@mjankowski
Copy link
Contributor

Related #30240

@renchap renchap requested a review from a team June 19, 2024 07:21
@renchap renchap added the to backport PR needed to be backported label Jun 19, 2024
@ClearlyClaire ClearlyClaire changed the title Added check for STATSD_ADDR setting to emit a warning and proceed rat… Added check for STATSD_ADDR setting to emit a warning and proceed rather than crashing if the address is unreachable Jun 21, 2024
Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me. This means statsd integration will fail almost silently in case of error, but that sounds like a better failure mode than completely preventing the server from working.

@ClearlyClaire ClearlyClaire added this pull request to the merge queue Jun 24, 2024
Merged via the queue into mastodon:main with commit f6e4660 Jun 24, 2024
33 checks passed
ClearlyClaire pushed a commit to ClearlyClaire/mastodon that referenced this pull request Jul 1, 2024
ClearlyClaire pushed a commit that referenced this pull request Jul 2, 2024
…her than crashing if the address is unreachable (#30691)
ClearlyClaire pushed a commit that referenced this pull request Jul 2, 2024
…her than crashing if the address is unreachable (#30691)
ClearlyClaire pushed a commit that referenced this pull request Jul 2, 2024
…her than crashing if the address is unreachable (#30691)
@ClearlyClaire ClearlyClaire removed the to backport PR needed to be backported label Jul 2, 2024
nomad-geek pushed a commit to dftba-club/mastodon that referenced this pull request Jul 3, 2024
kmycode pushed a commit to kmycode/mastodon that referenced this pull request Jul 4, 2024
noellabo pushed a commit to fedibird/mastodon that referenced this pull request Jul 5, 2024
ttrace pushed a commit to ttrace/mastodon that referenced this pull request Jul 5, 2024
Ember-ruby pushed a commit to Ember-ruby/mastodon-glitch that referenced this pull request Jul 5, 2024
fono09 pushed a commit to fono09/mastodon that referenced this pull request Jul 5, 2024
atsu1125 pushed a commit to atsu1125/mastodon that referenced this pull request Jul 6, 2024
noellabo pushed a commit to fedibird/mastodon that referenced this pull request Sep 9, 2024
justinwritescode pushed a commit to justinwritescode/mastodon that referenced this pull request Sep 15, 2024
noellabo pushed a commit to fedibird/mastodon that referenced this pull request Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enabling STATSD_ADDR env var when statsd isn't available often crashes sidekiq/web containers
4 participants