-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1321 from appsignal/ignore-rails-healthcheck
Automatically ignore Rails' health-check
- Loading branch information
Showing
6 changed files
with
79 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
bump: patch | ||
type: change | ||
--- | ||
|
||
Ignore the Rails healthcheck endpoint (Rails::HealthController#show) by default for Rails apps. | ||
|
||
If the `ignore_actions` option is set in the `config/appsignal.yml` file, the default is overwritten. | ||
If the `APPSIGNAL_IGNORE_ACTIONS` environment variable is set, the default is overwritten. | ||
When using the `Appsignal.configure` helper, add more actions to the default like so: | ||
|
||
```ruby | ||
# config/appsignal.rb | ||
Appsignal.configure do |config| | ||
# Add more actions to ignore | ||
config.ignore_actions << "My action" | ||
end | ||
``` | ||
|
||
To overwrite the default using the `Appsignal.configure` helper, do either of the following: | ||
|
||
```ruby | ||
# config/appsignal.rb | ||
Appsignal.configure do |config| | ||
# Overwrite the default value, ignoring all actions ignored by default | ||
config.ignore_actions = ["My action"] | ||
|
||
# To only remove the healtcheck endpoint | ||
config.ignore_actions.delete("Rails::HealthController#show") | ||
end | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters