fluent-plugin-honeycomb 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 9e8b797012c9236ae425f1e7eedc6fa092ee3aba
4
- data.tar.gz: 1ae8b3e70b777fdd3af766879f6be2c17d21cada
3
+ metadata.gz: f396ee93f9c4da4f5257d4ded3d7e7ca01b5244a
4
+ data.tar.gz: dda4097017d124e85433ace06f9dc409d5997f8e
5
5
  SHA512:
6
- metadata.gz: d99adba6eb128a09a7596121536154bf36d08d9e5fe91cf7ab349ed53069106e79fce87f7e5c21c0b0dff2501dfa86f4b67d90650f9e4870cd4f0227c9e4dc16
7
- data.tar.gz: 360a0037136d1f3c828406817853033858ee520756e28200a060c2b4ba6a10b457b34757fab02017892cf6e761b9b47606319a9725e4355cbeae164a1eb823f7
6
+ metadata.gz: 95b38a3691f8ac6f554544dc9ee4d462d45d4e2a4affc6b61bfc730eee3cb803d4f7e3deaec11bd424c6477eb6661ece0c03b43da936e08eb58bc45ff1088da8
7
+ data.tar.gz: 04c5f7435acfe97b82e2ff98a0a10e1da8d7fc4781083565dd4edbf6ed10f85fe5e08314f94fefb1921bfe903bad7c5c3d544a9f6dfabb63a3de15fb24bb2baa
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'fluent-plugin-honeycomb'
3
- spec.version = '0.2.0'
3
+ spec.version = '0.2.1'
4
4
  spec.date = '2017-02-07'
5
5
 
6
6
  spec.summary = "Fluentd output plugin for Honeycomb.io"
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-honeycomb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Honeycomb.io Team