-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add filter_metadata config option #973
Conversation
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
c7d09bd
to
caad6db
Compare
Added in PR appsignal/appsignal-ruby#973 in favor of the `sinatra_sanitized_routes` option.
Nit: |
This doesn't filter tags though, even if the metadata appears in the tags box. |
@tombruijn Oh! Today I learned there's a separate I think that, in the other integrations, there's no separate code paths for tags and metadata. |
Added in PR appsignal/appsignal-ruby#973 in favor of the `sinatra_sanitized_routes` option.
* Add example app for Sinatra sanitized routes Add test route to Sinatra app to test the sanitized routes / route definition to be set as the `path` metadata to avoid storing PII and other sensitive data. Related PR appsignal/appsignal-ruby#972 * Update config option to filter_metadata Added in PR appsignal/appsignal-ruby#973 in favor of the `sinatra_sanitized_routes` option.
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 thefilter_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 throughsample_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
To do
To do after merge