Skip to content

Commit 48d16c7

Browse files
committed
Improve changeset copy for appsignal.rb file
These are suggestions from the review and my own improvements.
1 parent 59f8283 commit 48d16c7

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.changesets/add-config-appsignal-rb-file-support.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type: add
55

66
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.
77

8-
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.
8+
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.
99

1010
Example `config/appsignal.rb` config file:
1111

@@ -16,4 +16,17 @@ Appsignal.configure do |config|
1616
end
1717
```
1818

19-
It is not possible to configure multiple environments in the `config/appsignal.rb` config file as it was possible in the YAML version.
19+
To configure different option values for environments in the `config/appsignal.rb` config file, use if-statements:
20+
21+
```ruby
22+
# config/appsignal.rb
23+
Appsignal.configure do |config|
24+
config.name = "My app name"
25+
if config.env == "production"
26+
config.ignore_actions << "My production action"
27+
end
28+
if config.env == "staging"
29+
config.ignore_actions << "My staging action"
30+
end
31+
end
32+
```

0 commit comments

Comments
 (0)