fluent-plugin-newrelic 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/fluent/plugin/out_newrelic.rb +13 -2
- data/lib/newrelic-fluentd-output/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 307e45eb9ebc697bbd30ca8241c2f2b0babb1a90e9606d05661a15ec31cebf65
|
4
|
+
data.tar.gz: cb641311b6dfb6c78e3854b59b8dace22d4aa32a82201587bcdfe1f99def043b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 717bca5a780c9ba5b8c920850958f4cc6a70b23764d8858942044a8d7ce937ca165a546c54b925036ab976302986b49909c0109768020f3dc9fc7cade7a037dc
|
7
|
+
data.tar.gz: 147f2831feda1b24efadd0e9f07375f26d85ab6ccf7ce2c83956e1f903cccccad180d3a718c40f300c940f49293f55a991902a6b28756a9bb1325e1b560187ef
|
data/.gitignore
CHANGED
@@ -110,11 +110,22 @@ module Fluent
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def sleep_duration(attempt)
|
113
|
-
|
113
|
+
if attempt == 0
|
114
|
+
return 0
|
115
|
+
end
|
116
|
+
|
117
|
+
[@max_delay, (2 ** (attempt - 1)) * @retry_seconds].min
|
118
|
+
end
|
119
|
+
|
120
|
+
def sleep_on_retry(attempt)
|
121
|
+
duration = sleep_duration(attempt)
|
122
|
+
if duration > 0
|
123
|
+
sleep duration
|
124
|
+
end
|
114
125
|
end
|
115
126
|
|
116
127
|
def attempt_send(payload, attempt)
|
117
|
-
|
128
|
+
sleep_on_retry(attempt)
|
118
129
|
attempt_send(payload, attempt + 1) unless was_successful?(send(payload)) if should_retry?(attempt)
|
119
130
|
end
|
120
131
|
|
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: 0.2.
|
4
|
+
version: 0.2.5
|
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: 2019-06
|
11
|
+
date: 2019-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|