zipkin-tracer 0.32.3 → 0.32.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/zipkin-tracer/config.rb +1 -4
- data/lib/zipkin-tracer/excon/zipkin-tracer.rb +1 -1
- data/lib/zipkin-tracer/faraday/zipkin-tracer.rb +1 -1
- data/lib/zipkin-tracer/trace.rb +7 -5
- data/lib/zipkin-tracer/tracer_factory.rb +0 -1
- data/lib/zipkin-tracer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3d88ef693423edc75cf6fcddfd3197bf653a6629ee36febbeaeda1eafa08ff4
|
4
|
+
data.tar.gz: c1e83e93144a84a8eaa632dbc50f90e32ee15414614faf3cda15d08f4a06dd18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1904ec28b08c0be932e19a6f46275cd48d515bc9002739cfc0d799e89da40eba8f3c0f983f6594ac4c38e2f8a7f19880ae03b2aadd7750cb83545a98c4db78d9
|
7
|
+
data.tar.gz: fd5c944ce0bfc2024f04562373dbe0185e6da0df9e07392bea5ba9ec197e641126bca4e3e133f9eee1b1abcee4c909ebfc8ea8a7e8eec1c07e2e6a4c68e22e5b
|
data/lib/zipkin-tracer/config.rb
CHANGED
@@ -5,7 +5,7 @@ require 'zipkin-tracer/rack/zipkin-tracer'
|
|
5
5
|
module ZipkinTracer
|
6
6
|
# Configuration of this gem. It reads the configuration and provides default values
|
7
7
|
class Config
|
8
|
-
attr_reader :service_name, :
|
8
|
+
attr_reader :service_name, :json_api_host,
|
9
9
|
:zookeeper, :sample_rate, :logger, :log_tracing,
|
10
10
|
:annotate_plugin, :filter_plugin, :whitelist_plugin,
|
11
11
|
:sampled_as_boolean, :record_on_server_receive,
|
@@ -15,8 +15,6 @@ module ZipkinTracer
|
|
15
15
|
config = config_hash || Application.config(app)
|
16
16
|
# The name of the current service
|
17
17
|
@service_name = config[:service_name]
|
18
|
-
# The port where the current service is running
|
19
|
-
@service_port = config[:service_port] || DEFAULTS[:service_port]
|
20
18
|
# The address of the Zipkin server which we will send traces to
|
21
19
|
@json_api_host = config[:json_api_host]
|
22
20
|
# Zookeeper information
|
@@ -74,7 +72,6 @@ module ZipkinTracer
|
|
74
72
|
|
75
73
|
DEFAULTS = {
|
76
74
|
sample_rate: 0.1,
|
77
|
-
service_port: 80,
|
78
75
|
sampled_as_boolean: true,
|
79
76
|
trace_id_128bit: false
|
80
77
|
}
|
data/lib/zipkin-tracer/trace.rb
CHANGED
@@ -235,7 +235,8 @@ module Trace
|
|
235
235
|
end
|
236
236
|
|
237
237
|
def record_tag(key, value, type = Trace::BinaryAnnotation::Type::STRING, endpoint = Trace.default_endpoint)
|
238
|
-
|
238
|
+
value = value.to_s if type == Trace::BinaryAnnotation::Type::STRING
|
239
|
+
binary_annotations << Trace::BinaryAnnotation.new(key, value, type, endpoint)
|
239
240
|
end
|
240
241
|
|
241
242
|
def record_local_component(value)
|
@@ -274,9 +275,9 @@ module Trace
|
|
274
275
|
signed_i32
|
275
276
|
end
|
276
277
|
|
277
|
-
def self.local_endpoint(
|
278
|
+
def self.local_endpoint(service_name, ip_format)
|
278
279
|
hostname = Socket.gethostname
|
279
|
-
Endpoint.new(hostname,
|
280
|
+
Endpoint.new(hostname, nil, service_name, ip_format)
|
280
281
|
end
|
281
282
|
|
282
283
|
def self.remote_endpoint(url, remote_service_name, ip_format)
|
@@ -285,11 +286,12 @@ module Trace
|
|
285
286
|
end
|
286
287
|
|
287
288
|
def to_h
|
288
|
-
{
|
289
|
+
hsh = {
|
289
290
|
ipv4: ipv4,
|
290
|
-
port: port,
|
291
291
|
serviceName: service_name
|
292
292
|
}
|
293
|
+
hsh[:port] = port if port
|
294
|
+
hsh
|
293
295
|
end
|
294
296
|
|
295
297
|
end
|
@@ -28,7 +28,6 @@ module ZipkinTracer
|
|
28
28
|
# TODO: move this to the TracerBase and kill scribe tracer
|
29
29
|
ip_format = [:kafka, :kafka_producer].include?(config.adapter) ? :i32 : :string
|
30
30
|
Trace.default_endpoint = Trace::Endpoint.local_endpoint(
|
31
|
-
config.service_port,
|
32
31
|
service_name(config.service_name),
|
33
32
|
ip_format
|
34
33
|
)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zipkin-tracer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.32.
|
4
|
+
version: 0.32.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franklin Hu
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2019-01
|
16
|
+
date: 2019-03-01 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: faraday
|