sentry-sanitizer 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +12 -8
- data/lib/sentry/sanitizer/cleaner.rb +7 -0
- data/lib/sentry/sanitizer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fda0761b926ec58a8247355163c29c8b3b48fe3f0b343e3fb492b6e6402b6e6c
|
|
4
|
+
data.tar.gz: 4e53e4ab1fe8194c6757ff958ddda229dcf6603b8724798c94fd24ccbe8681a2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb63ecf8b95c47080a0a376072600aac28839da51d3f3b3892c4cae7584bf7ec7367d81cee3f0db1afd687c45324d999135604b852f6c38dc99ec4b9ac03368c
|
|
7
|
+
data.tar.gz: 214ba8ef2ae130dcd99e5dce43d75c77b4fd6c2c1903479aa6e7f96915c4fccdaf0986860c96ed8192abcb9ff2a3c6f97735cbcaac7f907a1d5c0fad6184afef
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.1
|
|
4
|
+
|
|
5
|
+
- Sanitize `Sentry::TransactionEvent#spans` [#27](https://github.com/mrexox/sentry-sanitizer/pull/27)
|
|
6
|
+
|
|
3
7
|
## 0.10.0
|
|
4
8
|
|
|
5
9
|
- Sanitize transaction events (`before_send_transaction`) and check-in events (`before_send_check_in`). Only `request` and `extra` are sanitized; span data is not
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -21,16 +21,20 @@ Currently this gem provides following features
|
|
|
21
21
|
Add this line to your application's Gemfile:
|
|
22
22
|
|
|
23
23
|
```ruby
|
|
24
|
-
gem 'sentry-sanitizer', '
|
|
24
|
+
gem 'sentry-sanitizer', '~> 0.10.0'
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
And then
|
|
27
|
+
And then in the terminal:
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
```sh
|
|
30
|
+
bundle install
|
|
31
|
+
```
|
|
30
32
|
|
|
31
|
-
Or
|
|
33
|
+
Or alternatively:
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
```sh
|
|
36
|
+
gem install sentry-sanitizer
|
|
37
|
+
```
|
|
34
38
|
|
|
35
39
|
## Usage
|
|
36
40
|
|
|
@@ -74,15 +78,15 @@ end
|
|
|
74
78
|
|
|
75
79
|
Install dependencies
|
|
76
80
|
|
|
77
|
-
|
|
81
|
+
bin/setup
|
|
78
82
|
|
|
79
83
|
Experiment with the code in IRB
|
|
80
84
|
|
|
81
|
-
|
|
85
|
+
bin/console
|
|
82
86
|
|
|
83
87
|
Run tests
|
|
84
88
|
|
|
85
|
-
|
|
89
|
+
bin/rake test
|
|
86
90
|
|
|
87
91
|
## Contributing
|
|
88
92
|
|
|
@@ -46,6 +46,7 @@ module Sentry
|
|
|
46
46
|
event.request.query_string = sanitize_query_string(event.request.query_string)
|
|
47
47
|
end
|
|
48
48
|
event.extra = sanitize_data(event.extra)
|
|
49
|
+
event.spans = sanitize_data(event.spans) if event.is_a?(Sentry::TransactionEvent)
|
|
49
50
|
end
|
|
50
51
|
|
|
51
52
|
def sanitize_hash!(event)
|
|
@@ -66,6 +67,12 @@ module Sentry
|
|
|
66
67
|
elsif event[:extra]
|
|
67
68
|
event[:extra] = sanitize_data(event[:extra])
|
|
68
69
|
end
|
|
70
|
+
|
|
71
|
+
if event["spans"]
|
|
72
|
+
event["spans"] = sanitize_data(event["spans"])
|
|
73
|
+
elsif event[:spans]
|
|
74
|
+
event[:spans] = sanitize_data(event[:spans])
|
|
75
|
+
end
|
|
69
76
|
end
|
|
70
77
|
|
|
71
78
|
def sanitize_breadcrumb!(breadcrumb)
|