Skip to content

Commit

Permalink
Improve changeset copy for appsignal.rb file
Browse files Browse the repository at this point in the history
These are suggestions from the review and my own improvements.
  • Loading branch information
tombruijn committed Nov 11, 2024
1 parent 59f8283 commit 48d16c7
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .changesets/add-config-appsignal-rb-file-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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.
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:

Expand All @@ -16,4 +16,17 @@ Appsignal.configure do |config|
end
```

It is not possible to configure multiple environments in the `config/appsignal.rb` config file as it was possible in the YAML version.
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
```

0 comments on commit 48d16c7

Please sign in to comment.