zipkin 1.6.1 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/lib/zipkin/trace_id.rb +21 -1
- data/zipkin.gemspec +3 -3
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d406755c3fae0a6ad07050d0bfa19a903ce5e5ca414ad0530d172061ef0e2a69
|
4
|
+
data.tar.gz: 8f377efd4748398e92dc6cf565f40819e25cf26ca0a0b2f9c119e21ed7ce36c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c94f44c0d12367b67bddef7c928fa27528a13eedddf4a1b99c4c3eec34553ee8a6c949dc43797e00ce13ba8a47f59b615f4779fd7375ea1d28e2dda1a1fc6058
|
7
|
+
data.tar.gz: 904580f268829d5699001cc260ed53c26def532e84e50bf6eb9b9e44c89daa5861482d77a24722b729d775c1b5dbb514812d4ff68ac0b242fbfbf873409baffc
|
data/.travis.yml
CHANGED
data/lib/zipkin/trace_id.rb
CHANGED
@@ -4,8 +4,28 @@ module Zipkin
|
|
4
4
|
module TraceId
|
5
5
|
TRACE_ID_UPPER_BOUND = 2**64
|
6
6
|
|
7
|
+
# Random number generator for generating IDs. This is an object that can
|
8
|
+
# respond to `#bytes` and uses the system PRNG. The current logic is
|
9
|
+
# compatible with Ruby 2.5 (which does not implement the `Random.bytes`
|
10
|
+
# class method) and with Ruby 3.0+ (which deprecates `Random::DEFAULT`).
|
11
|
+
# When we drop support for Ruby 2.5, this can simply be replaced with
|
12
|
+
# the class `Random`.
|
13
|
+
#
|
14
|
+
# @return [#bytes]
|
15
|
+
RANDOM = Random.respond_to?(:bytes) ? Random : Random::DEFAULT
|
16
|
+
|
17
|
+
# An invalid trace identifier, an 8-byte string with all zero bytes.
|
18
|
+
INVALID_TRACE_ID = ("\0" * 8).b
|
19
|
+
|
20
|
+
# Generates a valid trace identifier, an 8-byte string with at least one
|
21
|
+
# non-zero byte.
|
22
|
+
#
|
23
|
+
# @return [String] a valid trace ID.
|
7
24
|
def self.generate
|
8
|
-
|
25
|
+
loop do
|
26
|
+
id = RANDOM.bytes(8)
|
27
|
+
return id.unpack1('H*') if id != INVALID_TRACE_ID
|
28
|
+
end
|
9
29
|
end
|
10
30
|
end
|
11
31
|
end
|
data/zipkin.gemspec
CHANGED
@@ -3,13 +3,13 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = 'zipkin'
|
6
|
-
spec.version = '1.6.
|
6
|
+
spec.version = '1.6.2'
|
7
7
|
spec.authors = ['SaleMove TechMovers']
|
8
8
|
spec.email = ['techmovers@salemove.com']
|
9
9
|
|
10
10
|
spec.summary = 'OpenTracing Tracer implementation for Zipkin in Ruby'
|
11
11
|
spec.description = ''
|
12
|
-
spec.homepage = ''
|
12
|
+
spec.homepage = 'https://github.com/salemove/zipkin-ruby-opentracing'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_development_dependency 'bundler', '~>
|
21
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
22
22
|
spec.add_development_dependency 'rake', '~> 10.0'
|
23
23
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
24
24
|
spec.add_development_dependency 'rubocop', '~> 0.54.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zipkin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SaleMove TechMovers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,7 +150,7 @@ files:
|
|
150
150
|
- script/create_http_trace
|
151
151
|
- script/create_trace
|
152
152
|
- zipkin.gemspec
|
153
|
-
homepage:
|
153
|
+
homepage: https://github.com/salemove/zipkin-ruby-opentracing
|
154
154
|
licenses:
|
155
155
|
- MIT
|
156
156
|
metadata: {}
|
@@ -169,8 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0'
|
171
171
|
requirements: []
|
172
|
-
|
173
|
-
rubygems_version: 2.7.6
|
172
|
+
rubygems_version: 3.0.3
|
174
173
|
signing_key:
|
175
174
|
specification_version: 4
|
176
175
|
summary: OpenTracing Tracer implementation for Zipkin in Ruby
|