-
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.
Add filter_metadata config option (#973)
We had a report of an app that contains sensitive information in the request path and the desire to filter this out. We have no system in place to filter metadata like path and request method, as set by the Sinatra middleware. This change allow apps to filter out some metadata that's set by default, like `path`, to avoid sending PII or other sensitive data, using the `filter_metadata` config option. Filtering is done with String based keys, like all the other `filter_*` config options are, so the keys need to be transformed to keys beforehand to make sure they're filtered out. I didn't merge how we set the metadata, now it's set using `Transaction#set_metadata` and through `sample_data` when the Transaction is being sampled as sample data. I've left the behavior the same as much as possible to avoid breaking things. See also this internal discussion: https://appsignal.slack.com/archives/CNPP953E2/p1687785270464119
- Loading branch information
Showing
7 changed files
with
48 additions
and
10 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,6 @@ | ||
--- | ||
bump: "patch" | ||
type: "add" | ||
--- | ||
|
||
Add `filter_metadata` config option to filter metadata set on Transactions set by default. Metadata like `path`, (request) `method`, `request_id`, `hostname`, etc. This can be useful if there's PII or other sensitive data in any of the app's metadata. |
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
Submodule diagnose
updated
4 files
+2 −1 | elixir/mix.lock | |
+7 −0 | nodejs/appsignal.cjs | |
+46 −6 | spec/diagnose_spec.rb | |
+2 −1 | spec/support/runner.rb |
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