libhoney 2.0.0 → 2.1.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 +4 -4
- data/.github/dependabot.yml +1 -1
- data/.github/workflows/apply-labels.yml +1 -1
- data/.github/workflows/re-triage.yml +12 -0
- data/CHANGELOG.md +14 -2
- data/lib/libhoney/transmission.rb +29 -5
- data/lib/libhoney/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87accb91b956f38c24050ebc8931d49041ab02551c394a7447434730eb827f18
|
4
|
+
data.tar.gz: 899a27302a4e04e2ac50af6f792a8515b252a838bb6b09d9471bf6aab9058cbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42b5a14b536bdda18f2900e2767c4702dd16e5a441300830c9a6cd7ae15d3e4c7d6b0edb3346bb278f239731b16ca8bc807851d57d3d3ad6da185782a48bf64c
|
7
|
+
data.tar.gz: 1e764f94ded5a848f6a90197f340d31efbc13b2fa6eae9f7be2444a19b8a8e65165356d68cd76dd51f5ce8910e742db9fd8a49546170b4dafa4d99471445979d
|
data/.github/dependabot.yml
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
name: Re-triage issues with new comments
|
2
|
+
on:
|
3
|
+
issue_comment:
|
4
|
+
types: [created]
|
5
|
+
jobs:
|
6
|
+
re-triage:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
name: Re-triage issues with new comments
|
9
|
+
steps:
|
10
|
+
- uses: honeycombio/oss-management-actions/re-triage@v1
|
11
|
+
with:
|
12
|
+
ghprojects-token: ${{ secrets.GHPROJECTS_TOKEN }}
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## [2.1.0] - 2022-02-02
|
2
|
+
|
3
|
+
### Improvements
|
4
|
+
|
5
|
+
- Retry an event batch send once if the connection appears to have been closed by the server due to idleness (#120) | [MikeGoldsmith](https://github.com/MikeGoldsmith)
|
6
|
+
|
7
|
+
### Maintenance
|
8
|
+
|
9
|
+
- gh: add re-triage workflow (#117) | [vreynolds](https://github.com/vreynolds)
|
10
|
+
- Update dependabot to monthly (#116) | [vreynolds](https://github.com/vreynolds)
|
11
|
+
- empower apply-labels action to apply labels (#115) | [robbkidd](https://github.com/robbkidd)
|
12
|
+
|
1
13
|
## [2.0.0] - 2021-10-07
|
2
14
|
|
3
15
|
### 💥 Breaking Changes
|
@@ -28,7 +40,7 @@
|
|
28
40
|
|
29
41
|
## 1.20.0
|
30
42
|
|
31
|
-
###
|
43
|
+
### Fixes
|
32
44
|
|
33
45
|
- Handle Timeout::Error in TransmissionClient (#95) | [Adam Pohorecki](https://github.com/psyho)
|
34
46
|
|
@@ -74,7 +86,7 @@
|
|
74
86
|
|
75
87
|
- Don't moneypatch Class (#70)
|
76
88
|
|
77
|
-
###
|
89
|
+
### Maintenance:
|
78
90
|
|
79
91
|
- Add lockfile to gitignore (#71)
|
80
92
|
|
@@ -74,11 +74,7 @@ module Libhoney
|
|
74
74
|
'X-Honeycomb-Team' => writekey
|
75
75
|
}
|
76
76
|
|
77
|
-
response = http
|
78
|
-
path: "/1/batch/#{Addressable::URI.escape(dataset)}",
|
79
|
-
body: body,
|
80
|
-
headers: headers
|
81
|
-
)
|
77
|
+
response = send_with_retry(http, dataset, body, headers)
|
82
78
|
process_response(response, before, batch)
|
83
79
|
rescue Exception => e
|
84
80
|
# catch a broader swath of exceptions than is usually good practice,
|
@@ -337,5 +333,33 @@ module Libhoney
|
|
337
333
|
h[api_host] = client
|
338
334
|
end
|
339
335
|
end
|
336
|
+
|
337
|
+
def send_with_retry(client, dataset, body, headers)
|
338
|
+
attempts = 0
|
339
|
+
begin
|
340
|
+
attempts += 1
|
341
|
+
client.post(
|
342
|
+
path: "/1/batch/#{Addressable::URI.escape(dataset)}",
|
343
|
+
body: body,
|
344
|
+
headers: headers
|
345
|
+
)
|
346
|
+
rescue Excon::Error::Socket => e
|
347
|
+
case e.socket_error
|
348
|
+
when EOFError
|
349
|
+
# The server may have closed an idle connection, but only
|
350
|
+
# half-way. In this scenario, Excon will receive an EOFError
|
351
|
+
# when attempting to post to the connection. We'll allow one
|
352
|
+
# retry after resetting the connection.
|
353
|
+
# We're not using Excon's idempotent retries because we only
|
354
|
+
# want to retry in the specific case of this exception, not
|
355
|
+
# retry all errors. Setting Excons :retry_errors param did not
|
356
|
+
# succeed in catching this situation.
|
357
|
+
client.reset
|
358
|
+
retry if attempts < 2
|
359
|
+
else
|
360
|
+
raise e
|
361
|
+
end
|
362
|
+
end
|
363
|
+
end
|
340
364
|
end
|
341
365
|
end
|
data/lib/libhoney/version.rb
CHANGED
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.
|
4
|
+
version: 2.1.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:
|
11
|
+
date: 2022-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bump
|
@@ -258,6 +258,7 @@ files:
|
|
258
258
|
- ".github/dependabot.yml"
|
259
259
|
- ".github/workflows/add-to-project.yml"
|
260
260
|
- ".github/workflows/apply-labels.yml"
|
261
|
+
- ".github/workflows/re-triage.yml"
|
261
262
|
- ".github/workflows/stale.yml"
|
262
263
|
- ".gitignore"
|
263
264
|
- ".rubocop.yml"
|
@@ -314,7 +315,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
314
315
|
- !ruby/object:Gem::Version
|
315
316
|
version: '0'
|
316
317
|
requirements: []
|
317
|
-
rubygems_version: 3.2.
|
318
|
+
rubygems_version: 3.2.32
|
318
319
|
signing_key:
|
319
320
|
specification_version: 4
|
320
321
|
summary: send data to Honeycomb
|