You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sentry-ruby/lib/sentry/configuration.rb
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -212,6 +212,7 @@ class Configuration
212
212
attr_accessor:propagate_traces
213
213
214
214
# Array of rack env parameters to be included in the event sent to sentry.
215
+
# @deprecated Use `data_collection.http_headers.request` to control request data collection instead.
215
216
# @return [Array<String>]
216
217
attr_accessor:rack_env_whitelist
217
218
@@ -826,6 +827,7 @@ def log_deprecations
826
827
log_warn("`send_default_pii` is deprecated; use `data_collection` instead.")ifself.send_default_pii
827
828
log_warn("`include_local_variables` is deprecated; use `data_collection.stack_frame_variables` instead.")ifinclude_local_variables
828
829
log_warn("`context_lines` is deprecated; use `data_collection.frame_context_lines` instead.")ifcontext_lines != 3
830
+
log_warn("`rack_env_whitelist` is deprecated; use `data_collection.http_headers.request` to control request data collection instead.")ifrack_env_whitelist != RACK_ENV_WHITELIST_DEFAULT
Copy file name to clipboardExpand all lines: sentry-ruby/spec/sentry/configuration_spec.rb
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,15 @@
39
39
40
40
expect(subject).tohave_received(:log_warn).with("`context_lines` is deprecated; use `data_collection.frame_context_lines` instead.")
41
41
end
42
+
43
+
it"warns when rack_env_whitelist is changed"do
44
+
allow(subject).toreceive(:log_warn)
45
+
subject.rack_env_whitelist=["REMOTE_ADDR"]
46
+
47
+
subject.send(:log_deprecations)
48
+
49
+
expect(subject).tohave_received(:log_warn).with("`rack_env_whitelist` is deprecated; use `data_collection.http_headers.request` to control request data collection instead.")
0 commit comments