libhoney 2.2.0.pre.dev → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2acde76ef3fc685e6ea13a5178b08f8f097df45b9731d157d3ef0ed653d1bbf
4
- data.tar.gz: 4fe2094102da89e268aa9acc67e10c722b255d846aed078f10212209da45ff52
3
+ metadata.gz: 3fded3aff49e82adca1103c69e01bfcf6c25096f381b35b8d4506de69743a03a
4
+ data.tar.gz: fda0eecd31f9c23d206ad5eb85bd9a46979f2489fa2b0f6872551c3b79e898df
5
5
  SHA512:
6
- metadata.gz: e5e52c97beae8e79a44a605260cf6d393461b434ee7fdab2fdb4652819899d8923a3460497b136dfa1c691032544e1276c5c6e8b28f5b38804c6f7d5528e050b
7
- data.tar.gz: 64984f592c88602e9033ccc7ed4f5e3fd271edf6c1356791cffab21224e4bdf9c64df2d86e1dd95b203ae62ea7af0e385b9092d12276a4bf0fe770718e01329c
6
+ metadata.gz: a60d2c1de54c08e418cd2af91dd61d3656567cf6597c7e0ae7dbb812f4d94009d35f6de83f1c0f83cc0944034a40ee777483cc3aa9994a9c5893e42334d6df79
7
+ data.tar.gz: 1f2ab384a92d6125c69a93b8ef537b7ce80139b68e891ff22b1ad10f7c1f5ed754cb8bfd1df7359793b801bde2c0b7342a56ffc7c6f7ca6959e1180090d50700
data/.github/CODEOWNERS CHANGED
@@ -2,4 +2,4 @@
2
2
  # This file controls who is tagged for review for any given pull request.
3
3
 
4
4
  # For anything not explicitly taken by someone else:
5
- * @honeycombio/telemetry-team
5
+ * @honeycombio/pipeline-team
data/.github/release.yml CHANGED
@@ -18,6 +18,8 @@ changelog:
18
18
  - title: 🛠 Maintenance
19
19
  labels:
20
20
  - "type: maintenance"
21
+ - "type: dependencies"
22
+ - "type: documentation"
21
23
  - title: 🤷 Other Changes
22
24
  labels:
23
- - "*"
25
+ - "*"
@@ -11,5 +11,5 @@ jobs:
11
11
  steps:
12
12
  - uses: actions/add-to-project@main
13
13
  with:
14
- project-url: https://github.com/orgs/honeycombio/projects/11
14
+ project-url: https://github.com/orgs/honeycombio/projects/27
15
15
  github-token: ${{ secrets.GHPROJECTS_TOKEN }}
data/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## [2.3.0] - 2024-03-07
2
+
3
+ ### Enhancements
4
+
5
+ - feat: support classic-flavored ingest keys (#138) | [robbkidd](https://github.com/robbkidd)
6
+
7
+ ### Maintenance
8
+
9
+ - maint: add labels to release.yml for auto-generated grouping (#139) | [JamieDanielson](https://github.com/JamieDanielson)
10
+ - maint: update codeowners to pipeline-team (#137) | [JamieDanielson](https://github.com/JamieDanielson)
11
+ - maint: update codeowners to pipeline (#136) | [JamieDanielson](https://github.com/JamieDanielson)
12
+ - docs: add development.md (#135) | [vreynolds](https://github.com/vreynolds)
13
+ - chore: update dependabot title (#134) | [pkanal](https://github.com/pkanal)
14
+ - ci: update validate PR title workflow (#133) | [pkanal](https://github.com/pkanal)
15
+ - ci: validate PR title (#132) | [pkanal](https://github.com/pkanal)
16
+ - maint: add wiki tracing example (#131) | [vreynolds](https://github.com/vreynolds)
17
+ - maint: delete workflows for old board (#130) | [vreynolds](https://github.com/vreynolds)
18
+ - maint: add release file (#129) | [vreynolds](https://github.com/vreynolds)
19
+ - maint: add new project workflow (#128) | [vreynolds](https://github.com/vreynolds)
20
+ - maint: add ruby 3.1 to CI matrix (#127) | [vreynolds](https://github.com/vreynolds)
21
+
1
22
  ## [2.2.0] - 2022-04-14
2
23
 
3
24
  ### Added
data/DEVELOPMENT.md ADDED
@@ -0,0 +1,31 @@
1
+ # Local Development
2
+
3
+ ## Requirements
4
+
5
+ Ruby: https://www.ruby-lang.org/en/documentation/installation/
6
+
7
+ Rake:
8
+
9
+ ```shell
10
+ gem install rake
11
+ ```
12
+
13
+ ## Install dependencies
14
+
15
+ ```shell
16
+ bundle install
17
+ ```
18
+
19
+ ## Run Tests
20
+
21
+ To run all tests:
22
+
23
+ ```shell
24
+ bundle exec rake test
25
+ ```
26
+
27
+ To run individual tests:
28
+
29
+ ```shell
30
+ bundle exec rake test TEST=test/log_transmission_test.rb
31
+ ```
data/README.md CHANGED
@@ -15,6 +15,8 @@ For tracing support and automatic instrumentation of Rails, Sinatra, Rack, Activ
15
15
 
16
16
  ## Contributions
17
17
 
18
+ See [DEVELOPMENT.md](./DEVELOPMENT.md)
19
+
18
20
  Features, bug fixes and other changes to `libhoney` are gladly accepted. Please
19
21
  open issues or a pull request with your change. Remember to add your name to the
20
22
  CONTRIBUTORS file!
@@ -278,7 +278,7 @@ module Libhoney
278
278
  end
279
279
 
280
280
  def get_dataset(dataset, write_key)
281
- return dataset if classic_write_key?(write_key)
281
+ return dataset if classic_api_key?(write_key)
282
282
 
283
283
  if dataset.nil? || dataset.empty?
284
284
  warn "nil or empty dataset - sending data to '#{DEFAULT_DATASET}'"
@@ -292,8 +292,9 @@ module Libhoney
292
292
  dataset
293
293
  end
294
294
 
295
- def classic_write_key?(write_key)
296
- write_key.nil? || write_key.length == 32
295
+ # @api private
296
+ def classic_api_key?(write_key)
297
+ Libhoney.classic_api_key?(write_key)
297
298
  end
298
299
  end
299
300
  end
@@ -1,3 +1,3 @@
1
1
  module Libhoney
2
- VERSION = '2.2.0-dev'.freeze
2
+ VERSION = '2.3.0'.freeze
3
3
  end
data/lib/libhoney.rb CHANGED
@@ -6,3 +6,25 @@ require 'libhoney/version'
6
6
  require 'libhoney/builder'
7
7
  require 'libhoney/response'
8
8
  require 'libhoney/transmission'
9
+
10
+ module Libhoney
11
+ # Determines if the given string is a Honeycomb API key for Classic environments.
12
+ #
13
+ # @param api_key [String] the string to check
14
+ # @return [Boolean] true if the string is nil or a classic API key, false otherwise
15
+ def self.classic_api_key?(api_key)
16
+ api_key.nil? || # default to classic behavior if no API key is provided
17
+ CLASSIC_KEY_ORIGINAL_FLAVOR.match?(api_key) ||
18
+ CLASSIC_KEY_V3_INGEST.match?(api_key)
19
+ end
20
+
21
+ # Private constant for key format detection.
22
+ # @api private
23
+ CLASSIC_KEY_ORIGINAL_FLAVOR = Regexp.new(/\A[[:alnum:]]{32}\z/)
24
+ private_constant :CLASSIC_KEY_ORIGINAL_FLAVOR
25
+
26
+ # Private constant for key format detection.
27
+ # @api private
28
+ CLASSIC_KEY_V3_INGEST = Regexp.new(/\Ahc[a-z]ic_[[:alnum:]]{58}\z/)
29
+ private_constant :CLASSIC_KEY_V3_INGEST
30
+ 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.2.0.pre.dev
4
+ version: 2.3.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: 2023-01-10 00:00:00.000000000 Z
11
+ date: 2024-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bump
@@ -268,6 +268,7 @@ files:
268
268
  - CODE_OF_CONDUCT.md
269
269
  - CONTRIBUTING.md
270
270
  - CONTRIBUTORS
271
+ - DEVELOPMENT.md
271
272
  - Gemfile
272
273
  - LICENSE
273
274
  - NOTICE
@@ -318,11 +319,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
318
319
  version: 2.4.0
319
320
  required_rubygems_version: !ruby/object:Gem::Requirement
320
321
  requirements:
321
- - - ">"
322
+ - - ">="
322
323
  - !ruby/object:Gem::Version
323
- version: 1.3.1
324
+ version: '0'
324
325
  requirements: []
325
- rubygems_version: 3.3.26
326
+ rubygems_version: 3.4.19
326
327
  signing_key:
327
328
  specification_version: 4
328
329
  summary: send data to Honeycomb