fluent-plugin-honeycomb 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-honeycomb.gemspec +1 -1
- data/lib/fluent/plugin/out_honeycomb.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f396ee93f9c4da4f5257d4ded3d7e7ca01b5244a
|
4
|
+
data.tar.gz: dda4097017d124e85433ace06f9dc409d5997f8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95b38a3691f8ac6f554544dc9ee4d462d45d4e2a4affc6b61bfc730eee3cb803d4f7e3deaec11bd424c6477eb6661ece0c03b43da936e08eb58bc45ff1088da8
|
7
|
+
data.tar.gz: 04c5f7435acfe97b82e2ff98a0a10e1da8d7fc4781083565dd4edbf6ed10f85fe5e08314f94fefb1921bfe903bad7c5c3d544a9f6dfabb63a3de15fb24bb2baa
|
@@ -60,6 +60,9 @@ module Fluent
|
|
60
60
|
if @include_tag_key
|
61
61
|
record[@tag_key] = tag
|
62
62
|
end
|
63
|
+
if @sample_rate > 1 && rand(1..@sample_rate) == 1
|
64
|
+
next
|
65
|
+
end
|
63
66
|
batch.push({
|
64
67
|
"data" => record,
|
65
68
|
"samplerate" => @sample_rate,
|
@@ -85,6 +88,7 @@ module Fluent
|
|
85
88
|
def parse_response(resp)
|
86
89
|
if resp.status != 200
|
87
90
|
# Force retry
|
91
|
+
log.error "Error sending batch: #{resp.status}, #{resp.body}"
|
88
92
|
raise Exception.new("Error sending batch: #{resp.status}, #{resp.body}")
|
89
93
|
else
|
90
94
|
begin
|