protobuf-opentracing 1.0.1 → 1.0.2.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +24 -0
- data/lib/protobuf/opentracing/version.rb +1 -1
- data/lib/protobuf/opentracing.rb +18 -1
- data/lib/protobuf/rpc/extensions/base.rb +26 -0
- data/lib/protobuf/rpc/extensions/client.rb +14 -0
- data/protobuf-opentracing.gemspec +4 -1
- metadata +54 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91a61883893c1e7326f9cd14659ab8fd8bfc156db13b7d557e006a1d1b8ba761
|
4
|
+
data.tar.gz: f316c35a5e05e0990886755cc18a4a4e66cbb844aff6e68bf65df15793c7a339
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d2a604be03cf0362593d5b779860e82726c0a92bafc6882ebd27124ee1be00b73d160a3c39d4336f1b4afe1465399c528760586af5fdcc6622731fc597c8184
|
7
|
+
data.tar.gz: 411678399ce00c5b6b4432b60600bc80a750379f75cc45a41368fcd3d6ff6003f0fc28f9bc4f67231454a565a91b4b6117d8d70bcd145c41f503de4c61a34441
|
data/.travis.yml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- ruby-head
|
4
|
+
- ruby-2.5.0
|
5
|
+
- jruby-9.1.7.0
|
6
|
+
|
7
|
+
matrix:
|
8
|
+
allow_failures:
|
9
|
+
- rvm: ruby-head
|
10
|
+
|
11
|
+
before_install:
|
12
|
+
- sudo apt-get update
|
13
|
+
- sudo apt-get install -y unzip
|
14
|
+
- gem update --system
|
15
|
+
- bundle install
|
16
|
+
- wget https://github.com/nats-io/gnatsd/releases/download/v0.9.4/gnatsd-v0.9.4-linux-amd64.zip
|
17
|
+
- unzip -p gnatsd-v0.9.4-linux-amd64.zip gnatsd-v0.9.4-linux-amd64/gnatsd > gnatsd
|
18
|
+
- chmod +x gnatsd
|
19
|
+
|
20
|
+
before_script:
|
21
|
+
- nohup ./gnatsd --addr 127.0.0.1 --port 4222 &
|
22
|
+
|
23
|
+
script:
|
24
|
+
- bundle exec rake
|
data/lib/protobuf/opentracing.rb
CHANGED
@@ -1,13 +1,30 @@
|
|
1
1
|
require "active_support"
|
2
|
+
require "opentracing"
|
2
3
|
|
3
|
-
require "protobuf/opentracing/version"
|
4
4
|
require "protobuf/opentracing/request_decoder"
|
5
|
+
require "protobuf/opentracing/version"
|
6
|
+
require "protobuf/rpc/extensions/base"
|
7
|
+
require "protobuf/rpc/extensions/client"
|
5
8
|
|
6
9
|
module Protobuf
|
7
10
|
module Opentracing
|
8
11
|
end
|
9
12
|
end
|
10
13
|
|
14
|
+
module Protobuf
|
15
|
+
module Rpc
|
16
|
+
module Connectors
|
17
|
+
class Base
|
18
|
+
prepend ::Protobuf::Opentracing::Extensions::Base
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
class Client
|
23
|
+
prepend ::Protobuf::Opentracing::Extensions::Client
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
11
28
|
::ActiveSupport.on_load(:protobuf_rpc_middleware) do |rpc|
|
12
29
|
rpc.middleware.insert_after(::Protobuf::Rpc::Middleware::RequestDecoder, ::Protobuf::Opentracing::RequestDecoder)
|
13
30
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Protobuf
|
2
|
+
module Opentracing
|
3
|
+
module Extensions
|
4
|
+
module Base
|
5
|
+
def request_fields
|
6
|
+
return super if ::OpenTracing.active_span.nil?
|
7
|
+
|
8
|
+
trace_carrier = {}
|
9
|
+
::OpenTracing.inject(::OpenTracing.active_span.context,
|
10
|
+
::OpenTracing::FORMAT_TEXT_MAP,
|
11
|
+
trace_carrier)
|
12
|
+
|
13
|
+
trace_headers = trace_carrier.map do |header|
|
14
|
+
::Protobuf::Socketrpc::Header.new(:key => header[0],
|
15
|
+
:value => header[1])
|
16
|
+
end
|
17
|
+
|
18
|
+
fields = super
|
19
|
+
headers = fields[:headers] || []
|
20
|
+
fields[:headers] = headers + trace_headers
|
21
|
+
fields
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -28,8 +28,11 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_dependency "activesupport", ">= 3.2", active_support_max_version
|
29
29
|
spec.add_dependency "opentracing"
|
30
30
|
|
31
|
-
spec.add_development_dependency "bundler"
|
31
|
+
spec.add_development_dependency "bundler"
|
32
|
+
spec.add_development_dependency "jaeger-client"
|
32
33
|
spec.add_development_dependency "mad_rubocop"
|
34
|
+
spec.add_development_dependency "protobuf", "~> 3.10.0"
|
35
|
+
spec.add_development_dependency "protobuf-nats"
|
33
36
|
spec.add_development_dependency "pry"
|
34
37
|
spec.add_development_dependency "rake", "~> 10.0"
|
35
38
|
spec.add_development_dependency "rspec", "~> 3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protobuf-opentracing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos Minond
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -40,20 +40,62 @@ dependencies:
|
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: jaeger-client
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: mad_rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: protobuf
|
43
85
|
requirement: !ruby/object:Gem::Requirement
|
44
86
|
requirements:
|
45
87
|
- - "~>"
|
46
88
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
89
|
+
version: 3.10.0
|
48
90
|
type: :development
|
49
91
|
prerelease: false
|
50
92
|
version_requirements: !ruby/object:Gem::Requirement
|
51
93
|
requirements:
|
52
94
|
- - "~>"
|
53
95
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
96
|
+
version: 3.10.0
|
55
97
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
98
|
+
name: protobuf-nats
|
57
99
|
requirement: !ruby/object:Gem::Requirement
|
58
100
|
requirements:
|
59
101
|
- - ">="
|
@@ -119,6 +161,7 @@ files:
|
|
119
161
|
- ".gitlab-ci.yml"
|
120
162
|
- ".rspec"
|
121
163
|
- ".rubocop.yml"
|
164
|
+
- ".travis.yml"
|
122
165
|
- Gemfile
|
123
166
|
- LICENSE.txt
|
124
167
|
- README.md
|
@@ -128,6 +171,8 @@ files:
|
|
128
171
|
- lib/protobuf/opentracing.rb
|
129
172
|
- lib/protobuf/opentracing/request_decoder.rb
|
130
173
|
- lib/protobuf/opentracing/version.rb
|
174
|
+
- lib/protobuf/rpc/extensions/base.rb
|
175
|
+
- lib/protobuf/rpc/extensions/client.rb
|
131
176
|
- protobuf-opentracing.gemspec
|
132
177
|
homepage: https://github.com/mxenabled/protobuf-opentracing
|
133
178
|
licenses:
|
@@ -144,11 +189,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
189
|
version: '0'
|
145
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
191
|
requirements:
|
147
|
-
- - "
|
192
|
+
- - ">"
|
148
193
|
- !ruby/object:Gem::Version
|
149
|
-
version:
|
194
|
+
version: 1.3.1
|
150
195
|
requirements: []
|
151
|
-
|
196
|
+
rubyforge_project:
|
197
|
+
rubygems_version: 2.7.6
|
152
198
|
signing_key:
|
153
199
|
specification_version: 4
|
154
200
|
summary: Add service to service tracing with Opentracing.
|