-
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.
Deprecate the request env keys to set the action (#1155)
Configuring the action name with the request env keys `appsignal.action` and `appsignal.route` don't give a reasonable guarantee when the action name is set. The `Appsignal.set_action` helper sets the action name immediately. The method via the request env sets the action name using `set_action_if_nil`. If the action name is set by one of our instrumentations beforehand or another `Appsiganl.set_action` call, there's no guarantee this value is used as the action name. We also never documented either of these keys, so I don't expect a lot of people to be using them. Closes #1116
- Loading branch information
Showing
3 changed files
with
79 additions
and
4 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
.changesets/deprecate-appsignal-route-and-appsignal-action-request-env.md
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,15 @@ | ||
--- | ||
bump: patch | ||
type: deprecate | ||
--- | ||
|
||
Deprecate the `appsignal.action` and `appsignal.route` request env methods to set the transaction action name. Use the `Appsignal.set_action` helper instead. | ||
|
||
```ruby | ||
# Before | ||
env["appsignal.action"] = "POST /my-action" | ||
env["appsignal.route"] = "POST /my-action" | ||
|
||
# After | ||
Appsignal.set_action("POST /my-action") | ||
``` |
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