logstash-filter-aggregate 2.5.1 → 2.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,63 +1,63 @@
1
- # encoding: utf-8
2
- require "logstash/filters/aggregate"
3
-
4
- def event(data = {})
5
- LogStash::Event.new(data)
6
- end
7
-
8
- def start_event(data = {})
9
- data["logger"] = "TASK_START"
10
- event(data)
11
- end
12
-
13
- def update_event(data = {})
14
- data["logger"] = "SQL"
15
- event(data)
16
- end
17
-
18
- def end_event(data = {})
19
- data["logger"] = "TASK_END"
20
- event(data)
21
- end
22
-
23
- def setup_filter(config = {})
24
- config["task_id"] ||= "%{taskid}"
25
- filter = LogStash::Filters::Aggregate.new(config)
26
- filter.register()
27
- return filter
28
- end
29
-
30
- def filter(event)
31
- @start_filter.filter(event)
32
- @update_filter.filter(event)
33
- @end_filter.filter(event)
34
- end
35
-
36
- def aggregate_maps()
37
- LogStash::Filters::Aggregate.class_variable_get(:@@aggregate_maps)
38
- end
39
-
40
- def taskid_eviction_instance()
41
- LogStash::Filters::Aggregate.class_variable_get(:@@flush_instance_map)["%{taskid}"]
42
- end
43
-
44
- def static_close_instance()
45
- LogStash::Filters::Aggregate.class_variable_get(:@@static_close_instance)
46
- end
47
-
48
- def aggregate_maps_path_set()
49
- LogStash::Filters::Aggregate.class_variable_get(:@@aggregate_maps_path_set)
50
- end
51
-
52
- def reset_timeout_management()
53
- LogStash::Filters::Aggregate.class_variable_set(:@@default_timeout, nil)
54
- LogStash::Filters::Aggregate.class_variable_get(:@@flush_instance_map).clear()
55
- LogStash::Filters::Aggregate.class_variable_get(:@@last_flush_timestamp_map).clear()
56
- end
57
-
58
- def reset_static_variables()
59
- reset_timeout_management()
60
- aggregate_maps().clear()
61
- LogStash::Filters::Aggregate.class_variable_set(:@@static_close_instance, nil)
62
- LogStash::Filters::Aggregate.class_variable_set(:@@aggregate_maps_path_set, false)
63
- end
1
+ # encoding: utf-8
2
+ require "logstash/filters/aggregate"
3
+
4
+ def event(data = {})
5
+ LogStash::Event.new(data)
6
+ end
7
+
8
+ def start_event(data = {})
9
+ data["logger"] = "TASK_START"
10
+ event(data)
11
+ end
12
+
13
+ def update_event(data = {})
14
+ data["logger"] = "SQL"
15
+ event(data)
16
+ end
17
+
18
+ def end_event(data = {})
19
+ data["logger"] = "TASK_END"
20
+ event(data)
21
+ end
22
+
23
+ def setup_filter(config = {})
24
+ config["task_id"] ||= "%{taskid}"
25
+ filter = LogStash::Filters::Aggregate.new(config)
26
+ filter.register()
27
+ return filter
28
+ end
29
+
30
+ def filter(event)
31
+ @start_filter.filter(event)
32
+ @update_filter.filter(event)
33
+ @end_filter.filter(event)
34
+ end
35
+
36
+ def aggregate_maps()
37
+ LogStash::Filters::Aggregate.class_variable_get(:@@aggregate_maps)
38
+ end
39
+
40
+ def taskid_eviction_instance()
41
+ LogStash::Filters::Aggregate.class_variable_get(:@@flush_instance_map)["%{taskid}"]
42
+ end
43
+
44
+ def static_close_instance()
45
+ LogStash::Filters::Aggregate.class_variable_get(:@@static_close_instance)
46
+ end
47
+
48
+ def aggregate_maps_path_set()
49
+ LogStash::Filters::Aggregate.class_variable_get(:@@aggregate_maps_path_set)
50
+ end
51
+
52
+ def reset_timeout_management()
53
+ LogStash::Filters::Aggregate.class_variable_set(:@@default_timeout, nil)
54
+ LogStash::Filters::Aggregate.class_variable_get(:@@flush_instance_map).clear()
55
+ LogStash::Filters::Aggregate.class_variable_get(:@@last_flush_timestamp_map).clear()
56
+ end
57
+
58
+ def reset_static_variables()
59
+ reset_timeout_management()
60
+ aggregate_maps().clear()
61
+ LogStash::Filters::Aggregate.class_variable_set(:@@static_close_instance, nil)
62
+ LogStash::Filters::Aggregate.class_variable_set(:@@aggregate_maps_path_set, false)
63
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-aggregate
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-01-08 00:00:00.000000000 Z
12
+ date: 2017-03-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement