fluent-plugin-azure-storage-append-blob-lts 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24eb19ac68cd42369ff7f147be24635945aad7c003f4ed789bcb4189d5f9a96e
|
4
|
+
data.tar.gz: f293437b177cf4f7fc7a02694150f03f479c70749a3973d2ffc45a19377b7784
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7be9b8cf563a7c2cf5b10667a8d037ea5a17d84a78ab3a782a937f5c06e0f850804985fef3b5b6eff795e965c4eefa0d690ddd737485929fa4882df416e420c0
|
7
|
+
data.tar.gz: d4bb668e69155459e1b69ce954f9b8434a9dfa5e92dbf5e1324e9a1d50514c2e7b6b34e513f5fcb3621f5ba7b2b2dee5d7dea1cf37788ffe198869f5d7a3a0a4
|
data/.github/CODEOWNERS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
* @elsesiy
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# fluent-plugin-azure-storage-append-blob-lts
|
2
2
|
|
3
|
+

|
4
|
+
[](https://badge.fury.io/rb/fluent-plugin-azure-storage-append-blob-lts)
|
5
|
+
[](http://twitter.com/elsesiy)
|
6
|
+
|
3
7
|
Azure Storage Append Blob output plugin buffers logs in local file and uploads them to Azure Storage Append Blob periodically.
|
4
8
|
This plugin is a fork of [microsoft/fluent-plugin-azure-storage-append-blob](https://github.com/microsoft/fluent-plugin-azure-storage-append-blob) which is not actively maintained.
|
5
9
|
|
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = 'fluent-plugin-azure-storage-append-blob-lts'
|
6
|
-
spec.version = '0.6.
|
6
|
+
spec.version = '0.6.2'
|
7
7
|
spec.authors = ['Jonas-Taha El Sesiy']
|
8
8
|
spec.email = ['github@elsesiy.com']
|
9
9
|
|
@@ -165,20 +165,19 @@ module Fluent
|
|
165
165
|
end
|
166
166
|
|
167
167
|
def write(chunk)
|
168
|
-
metadata = chunk.metadata
|
169
168
|
tmp = Tempfile.new('azure-')
|
170
169
|
begin
|
171
170
|
chunk.write_to(tmp)
|
172
171
|
|
173
|
-
generate_log_name(
|
172
|
+
generate_log_name(chunk, @current_index)
|
174
173
|
if @last_azure_storage_path != @azure_storage_path
|
175
174
|
@current_index = 0
|
176
|
-
generate_log_name(
|
175
|
+
generate_log_name(chunk, @current_index)
|
177
176
|
end
|
178
177
|
|
179
178
|
content = File.open(tmp.path, 'rb', &:read)
|
180
179
|
|
181
|
-
append_blob(content,
|
180
|
+
append_blob(content, chunk)
|
182
181
|
@last_azure_storage_path = @azure_storage_path
|
183
182
|
ensure
|
184
183
|
begin
|
@@ -214,7 +213,8 @@ module Fluent
|
|
214
213
|
end
|
215
214
|
end
|
216
215
|
|
217
|
-
def generate_log_name(
|
216
|
+
def generate_log_name(chunk, index)
|
217
|
+
metadata = chunk.metadata
|
218
218
|
time_slice = if metadata.timekey.nil?
|
219
219
|
''.freeze
|
220
220
|
else
|
@@ -228,10 +228,10 @@ module Fluent
|
|
228
228
|
'%{index}' => index
|
229
229
|
}
|
230
230
|
storage_path = @azure_object_key_format.gsub(/%{[^}]+}/, values_for_object_key)
|
231
|
-
@azure_storage_path = extract_placeholders(storage_path,
|
231
|
+
@azure_storage_path = extract_placeholders(storage_path, chunk)
|
232
232
|
end
|
233
233
|
|
234
|
-
def append_blob(content,
|
234
|
+
def append_blob(content, chunk)
|
235
235
|
position = 0
|
236
236
|
log.debug "azure_storage_append_blob: append_blob.start: Content size: #{content.length}"
|
237
237
|
loop do
|
@@ -246,7 +246,7 @@ module Fluent
|
|
246
246
|
if status_code == 409 # exceeds azure block limit
|
247
247
|
@current_index += 1
|
248
248
|
old_azure_storage_path = @azure_storage_path
|
249
|
-
generate_log_name(
|
249
|
+
generate_log_name(chunk, @current_index)
|
250
250
|
|
251
251
|
# If index is not a part of format, rethrow exception.
|
252
252
|
if old_azure_storage_path == @azure_storage_path
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-azure-storage-append-blob-lts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas-Taha El Sesiy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,6 +94,7 @@ executables: []
|
|
94
94
|
extensions: []
|
95
95
|
extra_rdoc_files: []
|
96
96
|
files:
|
97
|
+
- ".github/CODEOWNERS"
|
97
98
|
- ".github/workflows/publish.yaml"
|
98
99
|
- ".github/workflows/test.yaml"
|
99
100
|
- ".gitignore"
|