fluent-plugin-oci-logging 1.0.6 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fluent/plugin/out_oci_logging.rb +17 -4
- data/lib/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8da08ff601b50140201c74c6b8fc5a15da8f25288315ceee1b42382e5a051d55
|
4
|
+
data.tar.gz: 37e3601768a8b5eee329b72775683a18afe50c90f9c2741d3a0aa2d6ae4d3f93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0293f60930bf42b4fed3411ba74dd9389e8d8138d9ee512ae09c8b00c55e57b96c8a3c0e9c2b1fc59ff83e8daff49239d5ba1f592a10721a2c350db624ced0a9'
|
7
|
+
data.tar.gz: 433fe08996fcbd80888fdb476acb5d904eda926f08d5cfd98e12bf454fd337ae87b1efa3b991ee9eec2f921e6e0f866322d8133d3eceec696c9e7f34315d8813
|
@@ -42,6 +42,8 @@ module Fluent
|
|
42
42
|
|
43
43
|
helpers :event_emitter
|
44
44
|
|
45
|
+
PAYLOAD_SIZE = 9*1024*1024 #restricting payload size at 9MB
|
46
|
+
|
45
47
|
def configure(conf)
|
46
48
|
super
|
47
49
|
log.debug 'determining the signer type'
|
@@ -73,19 +75,30 @@ module Fluent
|
|
73
75
|
log.debug "writing chunk metadata #{chunk.metadata}", \
|
74
76
|
dump_unique_id_hex(chunk.unique_id)
|
75
77
|
log_batches_map = {}
|
76
|
-
|
77
|
-
|
78
|
+
# For standard chunk format (without #format() method)
|
79
|
+
size = 0
|
78
80
|
chunk.each do |time, record|
|
79
81
|
begin
|
80
82
|
tag = get_modified_tag(chunk.metadata.tag)
|
81
83
|
source_identifier = record.key?('tailed_path') ? record['tailed_path'] : ''
|
84
|
+
content = flatten_hash(record)
|
85
|
+
size += content.to_json.bytesize
|
82
86
|
build_request(time, record, tag, log_batches_map, source_identifier)
|
87
|
+
if size >= PAYLOAD_SIZE
|
88
|
+
log.info "Exceeding payload size. Size : #{size}"
|
89
|
+
send_requests(log_batches_map)
|
90
|
+
log_batches_map = {}
|
91
|
+
size = 0
|
92
|
+
end
|
83
93
|
rescue StandardError => e
|
84
94
|
log.error(e.full_message)
|
85
95
|
end
|
86
96
|
end
|
87
|
-
|
88
|
-
|
97
|
+
# flushing data to LJ
|
98
|
+
unless log_batches_map.empty?
|
99
|
+
log.info "Payload size : #{size}"
|
100
|
+
send_requests(log_batches_map)
|
101
|
+
end
|
89
102
|
end
|
90
103
|
end
|
91
104
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-oci-logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OCI Observability Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: '0'
|
188
188
|
requirements: []
|
189
|
-
rubygems_version: 3.
|
189
|
+
rubygems_version: 3.0.3
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: OCI Fluentd Logging output plugin following Unified Schema
|