logstash-filter-uuid 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/filters/uuid.rb +5 -3
- data/logstash-filter-uuid.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5930214775592b7079dd4fae6bf23f39ffa12df7
|
4
|
+
data.tar.gz: 21faef12b514463c6bda443cac911c4c6ed2f195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 612c30dbdc5232f7a1aac0703a1cc49e288cda3b03950bbdd9e56075f302c471b350b02039d2f722d9b4d8cd07781fa1abc2deb62341ce682a3c80b06c347554
|
7
|
+
data.tar.gz: a4ab3398f7bbcb1da7d5b399ce571343748264a5b4c7c08eaba5211ccaab88bc94d1bace961417d607e1048827b8e3c80648c99452853f3104415f05eb487d11
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 2.0.2
|
2
|
+
- Force SecureRandom uuids to be UTF8 because that is what LogStash::Event accepts
|
3
|
+
|
1
4
|
## 2.0.0
|
2
5
|
- Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
|
3
6
|
instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
|
@@ -43,11 +43,13 @@ class LogStash::Filters::Uuid < LogStash::Filters::Base
|
|
43
43
|
public
|
44
44
|
def filter(event)
|
45
45
|
|
46
|
-
|
46
|
+
# SecureRandom.uuid returns a non UTF8 string and since
|
47
|
+
# only UTF8 strings can be passed to a LogStash::Event
|
48
|
+
# we need to reencode it here
|
47
49
|
if overwrite
|
48
|
-
event[target] = SecureRandom.uuid
|
50
|
+
event[target] = SecureRandom.uuid.force_encoding(Encoding::UTF_8)
|
49
51
|
else
|
50
|
-
event[target] ||= SecureRandom.uuid
|
52
|
+
event[target] ||= SecureRandom.uuid.force_encoding(Encoding::UTF_8)
|
51
53
|
end
|
52
54
|
|
53
55
|
filter_matched(event)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-uuid'
|
4
|
-
s.version = '2.0.
|
4
|
+
s.version = '2.0.2'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "The uuid filter allows you to add a UUID field to messages."
|
7
7
|
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
|