fluent-plugin-postgresql-csvlog 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-postgresql-csvlog.gemspec +1 -1
- data/lib/fluent/plugin/filter_postgresql_redactor.rb +0 -1
- data/lib/fluent/plugin/filter_postgresql_slowlog.rb +1 -0
- data/test/plugin/test_filter_postgresql_redactor.rb +2 -2
- data/test/plugin/test_filter_postgresql_slowlog.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c99895582e6133a97c194d676882f42d0fad0ab52aff6cfe1b3fbbbcf32263a
|
4
|
+
data.tar.gz: 71135c5dddefbf8a61f8f6e3453daddd61df187b082201fb00dff4680ce0bdbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 518a30b929f02f82a6a6d80d03a4a1a9fa66174759c8f9b89a3243a7bf4d8168a43fe08631882630790afea4fb24eed4179215f85d7454c8fc63fc6e2aae1c6e
|
7
|
+
data.tar.gz: 43921a20185c91042274d0acbbd4c70ef94cb7c199675833890ab2cc946aa49065b8c0a624eb6691684e55bfa0945a02e9996f305211657ffae492e856deebe2
|
@@ -2,7 +2,7 @@ $:.push File.expand_path('lib', __dir__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'fluent-plugin-postgresql-csvlog'
|
5
|
-
s.version = '0.2.
|
5
|
+
s.version = '0.2.1'
|
6
6
|
s.authors = ['stanhu']
|
7
7
|
s.email = ['stanhu@gmail.com']
|
8
8
|
s.homepage = 'https://gitlab.com/gitlab-org/fluent-plugin-postgresql-csvlog'
|
@@ -27,7 +27,7 @@ class PostgreSQLRedactorTest < Test::Unit::TestCase
|
|
27
27
|
inputs.each { |input| d.feed(input) }
|
28
28
|
end
|
29
29
|
|
30
|
-
assert_equal(%w[duration_s fingerprint sql], d.filtered[0].last.keys.sort)
|
30
|
+
assert_equal(%w[duration_s fingerprint message sql], d.filtered[0].last.keys.sort)
|
31
31
|
assert_equal('SELECT * FROM projects WHERE id = $1', d.filtered[0].last['sql'])
|
32
32
|
end
|
33
33
|
|
@@ -63,7 +63,7 @@ class PostgreSQLRedactorTest < Test::Unit::TestCase
|
|
63
63
|
inputs.each { |input| d.feed(input) }
|
64
64
|
end
|
65
65
|
|
66
|
-
assert_equal(%w[duration_s fingerprint out_sql], d.filtered[0].last.keys.sort)
|
66
|
+
assert_equal(%w[duration_s fingerprint message out_sql], d.filtered[0].last.keys.sort)
|
67
67
|
assert_equal('SELECT * FROM projects WHERE id = $1', d.filtered[0].last['out_sql'])
|
68
68
|
end
|
69
69
|
end
|
@@ -44,6 +44,9 @@ class PostgreSQLSlowLogTest < Test::Unit::TestCase
|
|
44
44
|
}
|
45
45
|
),
|
46
46
|
d.filtered[1].last)
|
47
|
+
|
48
|
+
assert_equal(%w[duration_s query], d.filtered[0].last.keys.sort)
|
49
|
+
assert_equal(%w[duration_s query], d.filtered[1].last.keys.sort)
|
47
50
|
end
|
48
51
|
|
49
52
|
test 'ignores messages not having to do with slow logs' do
|
@@ -55,6 +58,7 @@ class PostgreSQLSlowLogTest < Test::Unit::TestCase
|
|
55
58
|
end
|
56
59
|
|
57
60
|
assert_equal(input, d.filtered[0].last)
|
61
|
+
assert_equal(%w[message], d.filtered[0].last.keys.sort)
|
58
62
|
end
|
59
63
|
|
60
64
|
test 'outputs slow log entries to configured output key' do
|
@@ -79,5 +83,7 @@ class PostgreSQLSlowLogTest < Test::Unit::TestCase
|
|
79
83
|
}
|
80
84
|
),
|
81
85
|
d.filtered[0].last)
|
86
|
+
|
87
|
+
assert_equal(%w[duration_s my_key], d.filtered[0].last.keys.sort)
|
82
88
|
end
|
83
89
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-postgresql-csvlog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stanhu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|