fluent-plugin-wodby 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-wodby.gemspec +1 -1
- data/lib/fluent/plugin/filter_wodby.rb +6 -2
- data/test/plugin/test_filter_wodby.rb +5 -3
- 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: 57ac4a430d1c7d6f5ff0be056648e3a1cf139a7964a2e2ef7bc86350412f9b19
|
4
|
+
data.tar.gz: 9adf5941a2fa080534b3f878e329cc5e81501c2025c180ef2cf3b511f34adf51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7490189d97937b66a21d8f6d391547d6d2aca6f010ac3861cfd825666c5db819c257186792057f54f32f8a26cf3647da321d91dd0b35177d5484a98de5a6d94b
|
7
|
+
data.tar.gz: acea16faaf6d820cb71394f47e6abc8e39a43d015d2fbf011a4c56ff0b7919c5b622465b14b2795090e5b05b9811f3e0819de37c876f28ece2498d80e17d7dd0
|
data/fluent-plugin-wodby.gemspec
CHANGED
@@ -41,10 +41,14 @@ module Fluent
|
|
41
41
|
instance = get_instance(namespace)
|
42
42
|
app = get_app(instance['app_id'])
|
43
43
|
|
44
|
-
@instance_map[namespace] =
|
44
|
+
@instance_map[namespace] = {
|
45
|
+
'name' => "#{app['name']}.#{instance['name']}",
|
46
|
+
'title' => "#{app['title']} - #{instance['title']}",
|
47
|
+
}
|
45
48
|
end
|
46
49
|
|
47
|
-
record['wodby.instance'] = @instance_map[namespace]
|
50
|
+
record['wodby.instance'] = @instance_map[namespace]['name']
|
51
|
+
record['wodby.instance_title'] = @instance_map[namespace]['title']
|
48
52
|
else
|
49
53
|
log.info "No namespace found"
|
50
54
|
log.info record
|
@@ -22,9 +22,11 @@ class WodbyFilterTest < Test::Unit::TestCase
|
|
22
22
|
end
|
23
23
|
|
24
24
|
assert_equal(3, d.filtered_records.size)
|
25
|
-
assert_equal('
|
26
|
-
assert_equal('
|
27
|
-
assert_equal('
|
25
|
+
assert_equal('dfono.staging', d.filtered_records[0]['wodby.instance'])
|
26
|
+
assert_equal('dfono.prod', d.filtered_records[1]['wodby.instance'])
|
27
|
+
assert_equal('dfono.staging', d.filtered_records[2]['wodby.instance'])
|
28
|
+
assert_equal('dfo.no - Staging', d.filtered_records[0]['wodby.instance_title'])
|
29
|
+
assert_equal('dfo.no - Prod', d.filtered_records[1]['wodby.instance_title'])
|
28
30
|
assert_nil(d.filtered_records[2]['wodby.instance_query'])
|
29
31
|
assert_true(d.filtered_records[0]['wodby.filter'])
|
30
32
|
assert_true(d.filtered_records[1]['wodby.filter'])
|