libhoney 2.3.0 → 2.4.0

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: 3fded3aff49e82adca1103c69e01bfcf6c25096f381b35b8d4506de69743a03a
4
- data.tar.gz: fda0eecd31f9c23d206ad5eb85bd9a46979f2489fa2b0f6872551c3b79e898df
3
+ metadata.gz: 5957d117bbef8260cb635436e196e4b2b66b0301809762843e3fbe81384c8fbe
4
+ data.tar.gz: 6c1b8644a2465eb4f69de5255610158e903f59204d208a741879d0ab8d66080b
5
5
  SHA512:
6
- metadata.gz: a60d2c1de54c08e418cd2af91dd61d3656567cf6597c7e0ae7dbb812f4d94009d35f6de83f1c0f83cc0944034a40ee777483cc3aa9994a9c5893e42334d6df79
7
- data.tar.gz: 1f2ab384a92d6125c69a93b8ef537b7ce80139b68e891ff22b1ad10f7c1f5ed754cb8bfd1df7359793b801bde2c0b7342a56ffc7c6f7ca6959e1180090d50700
6
+ metadata.gz: 90975e09691f61d5690d1e6546d0ff065b01eeaf34783c7c639f35965e9b684267af1851cfec712eff879c2b1830be92910de0e8becf732418060794f2178db0
7
+ data.tar.gz: b9841e88179d4d1d1d2650f63e0b1fb6b2cad72e53e319d2cbe65b9331150904bdb21df865318ab18b32571c9139cf79a96a645e552447a897b2e5d33967fcfe
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [2.4.0] - 2024-07-26
2
+
3
+ ### Fixes
4
+
5
+ - fix: omit events generated by the transmission of events (#141) | [ajvondrak](https://github.com/ajvondrak)
6
+
7
+ ### Maintenance
8
+
9
+ - docs: update vulnerability reporting process (#142) | [robbkidd](https://github.com/robbkidd)
10
+
1
11
  ## [2.3.0] - 2024-03-07
2
12
 
3
13
  ### Enhancements
data/SECURITY.md CHANGED
@@ -1,3 +1,26 @@
1
- # Reporting Security Issues
1
+ # Security Policy
2
2
 
3
- If you discover a security vulnerability, please open an issue with label `type: security`.
3
+ This security policy applies to public projects under the [honeycombio organization][gh-organization] on GitHub.
4
+ For security reports involving the services provided at `(ui|ui-eu|api|api-eu).honeycomb.io`, refer to the [Honeycomb Bug Bounty Program][bugbounty] for scope, expectations, and reporting procedures.
5
+
6
+ ## Security/Bugfix Versions
7
+
8
+ Security and bug fixes are generally provided only for the last minor version.
9
+ Fixes are released either as part of the next minor version or as an on-demand patch version.
10
+
11
+ Security fixes are given priority and might be enough to cause a new version to be released.
12
+
13
+ ## Reporting a Vulnerability
14
+
15
+ We encourage responsible disclosure of security vulnerabilities.
16
+ If you find something suspicious, we encourage and appreciate your report!
17
+
18
+ ### Ways to report
19
+
20
+ In order for the vulnerability reports to reach maintainers as soon as possible, the preferred way is to use the "Report a vulnerability" button under the "Security" tab of the associated GitHub project.
21
+ This creates a private communication channel between the reporter and the maintainers.
22
+
23
+ If you are absolutely unable to or have strong reasons not to use GitHub's vulnerability reporting workflow, please reach out to the Honeycomb security team at [security@honeycomb.io](mailto:security@honeycomb.io).
24
+
25
+ [gh-organization]: https://github.com/honeycombio
26
+ [bugbounty]: https://www.honeycomb.io/bugbountyprogram
@@ -121,7 +121,12 @@ module Libhoney
121
121
  #
122
122
  # @return [self] this event.
123
123
  def send_presampled
124
- @libhoney.send_event(self)
124
+ if Thread.current[:libhoney_transmitting]
125
+ @libhoney.send_dropped_response(self, 'dropped event generated during transmission')
126
+ else
127
+ @libhoney.send_event(self)
128
+ end
129
+
125
130
  self
126
131
  end
127
132
  end
@@ -19,6 +19,7 @@ module Libhoney
19
19
 
20
20
  # Prints an event
21
21
  def add(event)
22
+ Thread.current[:libhoney_transmitting] = true
22
23
  if @verbose
23
24
  metadata = "Honeycomb dataset '#{event.dataset}' | #{event.timestamp.iso8601}"
24
25
  metadata << " (sample rate: #{event.sample_rate})" if event.sample_rate != 1
@@ -27,6 +28,8 @@ module Libhoney
27
28
  clean_data(event.data).tap do |data|
28
29
  @output.puts(data.to_json)
29
30
  end
31
+ ensure
32
+ Thread.current[:libhoney_transmitting] = false
30
33
  end
31
34
 
32
35
  # Flushes the output (but does not close it)
@@ -16,7 +16,10 @@ module Libhoney
16
16
 
17
17
  # Records an event
18
18
  def add(event)
19
+ Thread.current[:libhoney_transmitting] = true
19
20
  @events.push(event)
21
+ ensure
22
+ Thread.current[:libhoney_transmitting] = false
20
23
  end
21
24
 
22
25
  # Does nothing.
@@ -53,7 +53,8 @@ module Libhoney
53
53
  ensure_threads_running
54
54
  end
55
55
 
56
- def send_loop
56
+ def send_loop # rubocop:disable Metrics/AbcSize
57
+ Thread.current[:libhoney_transmitting] = true
57
58
  http_clients = build_http_clients
58
59
 
59
60
  # eat events until we run out
@@ -106,6 +107,7 @@ module Libhoney
106
107
  nil
107
108
  end
108
109
  end
110
+ Thread.current[:libhoney_transmitting] = false
109
111
  end
110
112
 
111
113
  def close(drain)
@@ -1,3 +1,3 @@
1
1
  module Libhoney
2
- VERSION = '2.3.0'.freeze
2
+ VERSION = '2.4.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libhoney
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Honeycomb.io Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-07 00:00:00.000000000 Z
11
+ date: 2024-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bump
@@ -323,7 +323,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
323
323
  - !ruby/object:Gem::Version
324
324
  version: '0'
325
325
  requirements: []
326
- rubygems_version: 3.4.19
326
+ rubygems_version: 3.5.9
327
327
  signing_key:
328
328
  specification_version: 4
329
329
  summary: send data to Honeycomb