-
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 #1324 from appsignal/config-rb-file
Add config/appsignal.rb config file
- Loading branch information
Showing
14 changed files
with
657 additions
and
44 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,32 @@ | ||
--- | ||
bump: minor | ||
type: add | ||
--- | ||
|
||
Add `config/appsignal.rb` config file support. When a `config/appsignal.rb` file is present in the app, the Ruby gem will automatically load it when `Appsignal.start` is called. | ||
|
||
The `config/appsignal.rb` config file is a replacement for the `config/appsignal.yml` config file. When both files are present, only the `config/appsignal.rb` config file is loaded when the configuration file is automatically loaded by AppSignal when the configuration file is automatically loaded by AppSignal. | ||
|
||
Example `config/appsignal.rb` config file: | ||
|
||
```ruby | ||
# config/appsignal.rb | ||
Appsignal.configure do |config| | ||
config.name = "My app name" | ||
end | ||
``` | ||
|
||
To configure different option values for environments in the `config/appsignal.rb` config file, use if-statements: | ||
|
||
```ruby | ||
# config/appsignal.rb | ||
Appsignal.configure do |config| | ||
config.name = "My app name" | ||
if config.env == "production" | ||
config.ignore_actions << "My production action" | ||
end | ||
if config.env == "staging" | ||
config.ignore_actions << "My staging action" | ||
end | ||
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
Oops, something went wrong.