honeycomb-beeline 2.7.1 → 2.8.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: d073f7df59bebb1a80589c302eaace2c35c2d73a8a180a66aa787efcecb6b609
4
- data.tar.gz: d70ea8442d815282ec2942bbe11503faa9e619e3c1ada7fdb42e0a68a6f655b2
3
+ metadata.gz: fa203ac2df453da5a0e29891b24e4a29e354fb903f7cd5dcc9ad628412675955
4
+ data.tar.gz: 36d850c39cd38114abc078ac433afd8e1ec7f3e7bc6f6b2d58500e6c75cb09a9
5
5
  SHA512:
6
- metadata.gz: 6d71deb49303e135bb59d852b9513d5890fb3e10413d24ed5c041624b9b572753f422862e85213c02e3085afbceefe6ef016e2b2342239aa30d674088e8be2f2
7
- data.tar.gz: c92e6cf3fa914ee0d81ef3fdfd6104d7aa51d0e3848754982d280a76baee4acbe193a5954747d4b56fc9e6e4fd58e55f58553dc6481ebad0cac5edf4d77bd8f5
6
+ metadata.gz: '0820b6a9fc82ab51d583184eb34a4abdfff98f61d8d1c2807c3dffe884c3cc815499c718f90920c79e92e20d6166b990a39c47bb4e0eb17ff4da161e4f802f38'
7
+ data.tar.gz: 8a17134f59e43879990446dc9ec53a07fdf49567c77b04c2339586eb35c472924e6d36743ee2515adfaffd88db05835f28a5f1cdf7b2776bbdd2fc169ba660cb
@@ -8,7 +8,7 @@ updates:
8
8
  - package-ecosystem: "bundler" # See documentation for possible values
9
9
  directory: "/gemfiles/" # Location of package manifests
10
10
  schedule:
11
- interval: "weekly"
11
+ interval: "monthly"
12
12
  labels:
13
13
  - "type: dependencies"
14
14
  reviewers:
@@ -1,5 +1,5 @@
1
1
  name: Apply project labels
2
- on: [issues, pull_request, label]
2
+ on: [issues, pull_request_target, label]
3
3
  jobs:
4
4
  apply-labels:
5
5
  runs-on: ubuntu-latest
data/.rubocop.yml CHANGED
@@ -38,6 +38,7 @@ Style/AccessModifierDeclarations:
38
38
  - lib/honeycomb/propagation/aws.rb
39
39
  - lib/honeycomb/propagation/w3c.rb
40
40
  - lib/honeycomb/propagation/honeycomb.rb
41
+ - lib/honeycomb/propagation/default.rb
41
42
 
42
43
  Style/FrozenStringLiteralComment:
43
44
  EnforcedStyle: always
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # beeline-ruby changelog
2
2
 
3
+ ## 2.8.0 2021-12-22
4
+
5
+ ### Improvements
6
+
7
+ - feat: accept both w3c and honeycomb propagation headers by default (#183) | [@robbkidd](https://github.com/robbkidd)
8
+
9
+ ### Maintenance
10
+
11
+ - Update dependabot to monthly (#181) | [@vreynolds](https://github.com/vreynolds)
12
+ - empower apply-labels action to apply labels (#179) | [@robbkidd](https://github.com/robbkidd)
13
+
3
14
  ## 2.7.1 2021-10-22
4
15
 
5
16
  ### Maintenance
@@ -3,7 +3,7 @@
3
3
  module Honeycomb
4
4
  module Beeline
5
5
  NAME = "honeycomb-beeline".freeze
6
- VERSION = "2.7.1".freeze
6
+ VERSION = "2.8.0".freeze
7
7
  USER_AGENT_SUFFIX = "#{NAME}/#{VERSION}".freeze
8
8
  end
9
9
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "socket"
4
- require "honeycomb/propagation/honeycomb"
4
+ require "honeycomb/propagation/default"
5
5
 
6
6
  module Honeycomb
7
7
  # Used to configure the Honeycomb client
@@ -75,7 +75,7 @@ module Honeycomb
75
75
  @http_trace_parser_hook
76
76
  else
77
77
  # by default we try to parse incoming honeycomb traces
78
- HoneycombPropagation::UnmarshalTraceContext.method(:parse_rack_env)
78
+ DefaultPropagation::UnmarshalTraceContext.method(:parse_rack_env)
79
79
  end
80
80
  end
81
81
 
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "honeycomb/propagation/honeycomb"
4
+ require "honeycomb/propagation/w3c"
5
+
6
+ module Honeycomb
7
+ # Default behavior for handling trace propagation
8
+ module DefaultPropagation
9
+ # Parse incoming trace headers.
10
+ #
11
+ # Checks for and parses Honeycomb's trace header or, if not found,
12
+ # then checks for and parses W3C trace parent header.
13
+ module UnmarshalTraceContext
14
+ def parse_rack_env(env)
15
+ if env["HTTP_X_HONEYCOMB_TRACE"]
16
+ HoneycombPropagation::UnmarshalTraceContext.parse_rack_env env
17
+ elsif env["HTTP_TRACEPARENT"]
18
+ W3CPropagation::UnmarshalTraceContext.parse_rack_env env
19
+ else
20
+ [nil, nil, nil, nil]
21
+ end
22
+ end
23
+ module_function :parse_rack_env
24
+ public :parse_rack_env
25
+ end
26
+ end
27
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeycomb-beeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.1
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Holman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-22 00:00:00.000000000 Z
11
+ date: 2021-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libhoney
@@ -292,6 +292,7 @@ files:
292
292
  - lib/honeycomb/propagation.rb
293
293
  - lib/honeycomb/propagation/aws.rb
294
294
  - lib/honeycomb/propagation/context.rb
295
+ - lib/honeycomb/propagation/default.rb
295
296
  - lib/honeycomb/propagation/honeycomb.rb
296
297
  - lib/honeycomb/propagation/w3c.rb
297
298
  - lib/honeycomb/rollup_fields.rb