opencensus 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 90ff804d909c01ac8eb0ba83fd0add78451b186f
4
- data.tar.gz: 16805cbe660a480f7aa52a3e3cb25ff8a799f039
3
+ metadata.gz: 56ee4a54946052aaf5fe421b263e80644b2f98b2
4
+ data.tar.gz: 7e4f749225fd17d54e35ccdf2951735147591b9e
5
5
  SHA512:
6
- metadata.gz: 6be6ad106a73d7f5972e5eba7af5449a484bc04e6c967ffd3d59d4776bb4c9d2d79308938fe0d7bc538f4d95b0fc567c286a9d21056a9695e52ac5c049016597
7
- data.tar.gz: 9557b149c2ba5997152d511c22149b2c21922e6ec723d7fa0ecf0571f83440afd086e2a6a1c8c4e55bbd5f22989f4bbc434ccd298525d9a428c70b6739e79954
6
+ metadata.gz: 7f40a4d9820bff2cb495b2a560b4aea142d4b88e6acb98219eeaa31aa909ed6199c18877bea1be0f51255bec50beeca7597fb50f8207fa68087c7bffbbae892b
7
+ data.tar.gz: 07d4b90fa431b3860d2a4d02736d0699a0f55e1ff798faa8f541bcf165d2b97c074ede40fc51d61d8a2441b330e5759f1d1a9669dced29fbe2ad2e6a19e6222e
@@ -1,8 +1,11 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.4.1
5
- before_install: gem install bundler -v 1.15.1
4
+ - 2.2.9
5
+ - 2.3.6
6
+ - 2.4.3
7
+ - 2.5.0
8
+ before_install: gem install bundler -v 1.16.1
6
9
  script:
7
10
  - bundle exec rake
8
11
 
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 0.2.1 / 2018-03-05
4
+
5
+ * Clarify Ruby version requirement (2.2+)
6
+ * Fix exceptions in the config library on Ruby 2.2 and 2.3.
7
+ * Automatically require opencensus base library from standard integrations.
8
+
3
9
  ### 0.2.0 / 2018-02-13
4
10
 
5
11
  * Span creation sets the "same_process_as_parent_span" field if possible.
data/README.md CHANGED
@@ -150,7 +150,7 @@ and
150
150
 
151
151
  ### Supported Ruby Versions
152
152
 
153
- This library is supported on Ruby 2.0+.
153
+ This library is supported on Ruby 2.2+.
154
154
 
155
155
  ### Versioning
156
156
 
@@ -217,9 +217,7 @@ module OpenCensus
217
217
  #
218
218
  def reset! key = nil
219
219
  if key.nil?
220
- # rubocop:disable Performance/HashEachMethods
221
220
  @fields.keys.each { |k| reset! k }
222
- # rubocop:enable Performance/HashEachMethods
223
221
  else
224
222
  key = key.to_sym
225
223
  unless @fields.key? key
@@ -385,7 +383,11 @@ module OpenCensus
385
383
  # @return [Hash]
386
384
  #
387
385
  def to_h!
388
- @fields.transform_values { |v| v.is_a?(Config) ? v.to_h! : v.value }
386
+ result = {}
387
+ @fields.each do |k, v|
388
+ result[k] = v.is_a?(Config) ? v.to_h! : v.value
389
+ end
390
+ result
389
391
  end
390
392
 
391
393
  ##
@@ -18,6 +18,11 @@ module OpenCensus
18
18
  # The Integrations module contains implementations of integrations with
19
19
  # popular gems such as Rails and Faraday.
20
20
  #
21
+ # Integrations are not loaded by default. To use an integration,
22
+ # require it explicitly. e.g.:
23
+ #
24
+ # require "opencensus/trace/integrations/rack_middleware"
25
+ #
21
26
  module Integrations
22
27
  end
23
28
  end
@@ -14,6 +14,8 @@
14
14
 
15
15
  require "faraday"
16
16
 
17
+ require "opencensus"
18
+
17
19
  module OpenCensus
18
20
  module Trace
19
21
  module Integrations
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ require "opencensus"
16
+
15
17
  module OpenCensus
16
18
  module Trace
17
19
  module Integrations
@@ -177,7 +177,7 @@ module OpenCensus
177
177
  # @private
178
178
  #
179
179
  def initialize trace_id, span_id, name, start_time, end_time,
180
- parent_span_id: nil, attributes: {},
180
+ parent_span_id: "", attributes: {},
181
181
  dropped_attributes_count: 0, stack_trace: [],
182
182
  dropped_frames_count: 0, time_events: [],
183
183
  dropped_annotations_count: 0,
@@ -14,5 +14,5 @@
14
14
 
15
15
  module OpenCensus
16
16
  ## Current OpenCensus version
17
- VERSION = "0.2.0".freeze
17
+ VERSION = "0.2.1".freeze
18
18
  end
@@ -21,6 +21,8 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
+ spec.required_ruby_version = ">= 2.2.0"
25
+
24
26
  spec.add_development_dependency "bundler", "~> 1.16"
25
27
  spec.add_development_dependency "rake", "~> 12.0"
26
28
  spec.add_development_dependency "minitest", "~> 5.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opencensus
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
  - Jeff Ching
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-02-13 00:00:00.000000000 Z
12
+ date: 2018-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -198,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - ">="
200
200
  - !ruby/object:Gem::Version
201
- version: '0'
201
+ version: 2.2.0
202
202
  required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  requirements:
204
204
  - - ">="