fluent-plugin-newrelic 1.2.1 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4be95038976a5e5e708c6fdc9d733a7293aaf63461fb67378f953cc093df633
|
4
|
+
data.tar.gz: 9cc28ceaa43fbaf330c631a2614ba911802bf442ac540b27b2ff23d58cadab2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27e2a425b516c5570c81b9680f1357e5fe27f9f9ebcbf885eeee6f30bd8402cc8d962b0fad3a7984a83e0528e1e17213a56421ccbeb83000408b122bbae52ac0
|
7
|
+
data.tar.gz: 6bc8cab7df418903885686e1da65f8de0e0704061af18f6fcf389d88b40be9eeed9bd48d55372c1ffac109f38c8633013541dedeb2b8bd2384922411dca7e810
|
data/.github/workflows/pr.yml
CHANGED
@@ -5,7 +5,7 @@ on: [pull_request]
|
|
5
5
|
jobs:
|
6
6
|
ci:
|
7
7
|
name: Continuous Integration pipeline
|
8
|
-
runs-on: ubuntu-
|
8
|
+
runs-on: ubuntu-20.04
|
9
9
|
|
10
10
|
steps:
|
11
11
|
- name: Checkout code
|
@@ -21,8 +21,7 @@ jobs:
|
|
21
21
|
run: bundle exec rake
|
22
22
|
|
23
23
|
- name: Publish Unit Test Results
|
24
|
-
uses: EnricoMi/publish-unit-test-result-action@v1.
|
24
|
+
uses: EnricoMi/publish-unit-test-result-action@v1.19
|
25
25
|
if: always()
|
26
26
|
with:
|
27
|
-
|
28
|
-
files: '**/TEST-*.xml'
|
27
|
+
files: '**/TEST-*.xml'
|
@@ -75,11 +75,8 @@ module Fluent
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def package_record(record, timestamp)
|
78
|
-
if defined? timestamp.nsec
|
79
|
-
timestamp = timestamp * 1000 + timestamp.nsec / 1_000_000
|
80
|
-
end
|
81
78
|
packaged = {
|
82
|
-
'timestamp' => timestamp,
|
79
|
+
'timestamp' => resolveTimestamp(record['timestamp'], timestamp),
|
83
80
|
# non-intrinsic attributes get put into 'attributes'
|
84
81
|
'attributes' => record
|
85
82
|
}
|
@@ -141,6 +138,7 @@ module Fluent
|
|
141
138
|
return [compressed_payload]
|
142
139
|
end
|
143
140
|
|
141
|
+
compressed_payload_bytesize = compressed_payload.bytesize
|
144
142
|
compressed_payload = nil # Free for GC
|
145
143
|
|
146
144
|
if logs.length > 1 # we can split
|
@@ -150,7 +148,8 @@ module Fluent
|
|
150
148
|
second_half = get_compressed_payloads(logs.slice(midpoint, logs.length))
|
151
149
|
return first_half + second_half
|
152
150
|
else
|
153
|
-
log.error("Can't compress record below required maximum packet size and it will be discarded.
|
151
|
+
log.error("Can't compress record below required maximum packet size and it will be discarded. " +
|
152
|
+
"Record timestamp: #{logs[0]['timestamp']}. Compressed size: #{compressed_payload_bytesize} bytes. Uncompressed size: #{payload.to_json.bytesize} bytes.")
|
154
153
|
return []
|
155
154
|
end
|
156
155
|
end
|
@@ -181,6 +180,17 @@ module Fluent
|
|
181
180
|
gzip.close
|
182
181
|
io.string
|
183
182
|
end
|
183
|
+
|
184
|
+
def resolveTimestamp(recordTimestamp, fluentdTimestamp)
|
185
|
+
if recordTimestamp
|
186
|
+
recordTimestamp
|
187
|
+
else
|
188
|
+
if defined? fluentdTimestamp.nsec
|
189
|
+
fluentdTimestamp = fluentdTimestamp * 1000 + fluentdTimestamp.nsec / 1_000_000
|
190
|
+
end
|
191
|
+
fluentdTimestamp
|
192
|
+
end
|
193
|
+
end
|
184
194
|
end
|
185
195
|
end
|
186
196
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-newrelic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- New Relic Logging Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|