opentelemetry-exporter-zipkin 0.17.0 → 0.19.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/README.md +9 -11
- data/lib/opentelemetry/exporter/zipkin/exporter.rb +1 -1
- data/lib/opentelemetry/exporter/zipkin/transformer.rb +5 -5
- data/lib/opentelemetry/exporter/zipkin/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc1da69b1c635664ff0e4ada80bc9f4cb9bcc95b3dc00c3742bc83c0a71a59f5
|
4
|
+
data.tar.gz: 3f3858152593f4f064bba502b407cd6ed7dd4c9b203df8191245bfc891f11286
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2abf30f17439f4051637e2ccefd133d3a5303e82ba7fede98f7e5a5fe7554f3b0efe06ba22753b769c7976b0de5cfa21cbcb53495cc5c6bb243af05a4d0c5f28
|
7
|
+
data.tar.gz: 9d8d7233738a5bed0708e9f895e105cfeb109e43c7a2845aeee69e3c1714a75ae08135b093e004379f28f8062892b83d84222fb583614c1cb68eb848ee37e797
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# Release History: opentelemetry-exporter-zipkin
|
2
2
|
|
3
|
+
### v0.19.2 / 2021-09-29
|
4
|
+
|
5
|
+
* (No significant changes)
|
6
|
+
|
7
|
+
### v0.19.1 / 2021-08-12
|
8
|
+
|
9
|
+
* DOCS: Update docs to rely more on environment variable configuration
|
10
|
+
|
11
|
+
### v0.19.0 / 2021-06-23
|
12
|
+
|
13
|
+
* BREAKING CHANGE: Total order constraint on span.status=
|
14
|
+
|
15
|
+
* FIXED: Total order constraint on span.status=
|
16
|
+
|
17
|
+
### v0.18.0 / 2021-05-21
|
18
|
+
|
19
|
+
* BREAKING CHANGE: Replace Time.now with Process.clock_gettime
|
20
|
+
|
21
|
+
* FIXED: Replace Time.now with Process.clock_gettime
|
22
|
+
|
3
23
|
### v0.17.0 / 2021-04-22
|
4
24
|
|
5
25
|
* Initial release.
|
data/README.md
CHANGED
@@ -31,16 +31,14 @@ Then, configure the SDK to use a zipkin exporter as a span processor, and use th
|
|
31
31
|
require 'opentelemetry/sdk'
|
32
32
|
require 'opentelemetry/exporter/zipkin'
|
33
33
|
|
34
|
-
#
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
c.service_version = '0.15.0'
|
43
|
-
end
|
34
|
+
# Select the zipkin exporter via environmental variables
|
35
|
+
ENV['OTEL_TRACES_EXPORTER'] = 'zipkin'
|
36
|
+
|
37
|
+
ENV['OTEL_SERVICE_NAME'] = 'zipkin-example'
|
38
|
+
ENV['OTEL_SERVICE_VERSION'] = '0.15.0'
|
39
|
+
|
40
|
+
# The zipkin expects an exporter running on localhost:9411 - you may override this if needed:
|
41
|
+
# ENV['OTEL_EXPORTER_ZIPKIN_ENDPOINT'] = 'http://some.other.host:12345'
|
44
42
|
|
45
43
|
# To start a trace you need to get a Tracer from the TracerProvider
|
46
44
|
tracer = OpenTelemetry.tracer_provider.tracer('my_app_or_gem', '0.1.0')
|
@@ -63,7 +61,7 @@ For additional examples, see the [examples on github][examples-github].
|
|
63
61
|
|
64
62
|
## How can I configure the Zipkin exporter?
|
65
63
|
|
66
|
-
The collector exporter can be configured explicitly in code,
|
64
|
+
The collector exporter can be configured explicitly in code, or via environment variables as shown above. The configuration parameters, environment variables, and defaults are shown below.
|
67
65
|
|
68
66
|
| Parameter | Environment variable | Default |
|
69
67
|
| ----------- | --------------------------------------| -------------------------- |
|
@@ -132,7 +132,7 @@ module OpenTelemetry
|
|
132
132
|
def send_spans(zipkin_spans, timeout: nil) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
|
133
133
|
retry_count = 0
|
134
134
|
timeout ||= @timeout
|
135
|
-
start_time =
|
135
|
+
start_time = OpenTelemetry::Common::Utilities.timeout_timestamp
|
136
136
|
around_request do # rubocop:disable Metrics/BlockLength
|
137
137
|
request = Net::HTTP::Post.new(@path)
|
138
138
|
request.body = JSON.generate(zipkin_spans)
|
@@ -38,8 +38,8 @@ module OpenTelemetry
|
|
38
38
|
private_constant(:KIND_MAP, :DEFAULT_SERVICE_NAME, :SERVICE_NAME_ATTRIBUTE_KEY, :ERROR_TAG_KEY, :STATUS_CODE_NAME, :STATUS_ERROR, :STATUS_OK, :ATTRIBUTE_PEER_SERVICE, :ATTRIBUTE_NET_PEER_IP, :ATTRIBUTE_NET_PEER_PORT, :ATTRIBUTE_NET_HOST_IP, :ATTRIBUTE_NET_HOST_PORT)
|
39
39
|
|
40
40
|
def to_zipkin_span(span_d, resource)
|
41
|
-
start_time =
|
42
|
-
duration =
|
41
|
+
start_time = span_d.start_timestamp / 1_000
|
42
|
+
duration = span_d.end_timestamp / 1_000 - start_time
|
43
43
|
tags = {}
|
44
44
|
service_name = DEFAULT_SERVICE_NAME
|
45
45
|
resource.attribute_enumerator.select do |key, value|
|
@@ -91,7 +91,7 @@ module OpenTelemetry
|
|
91
91
|
def add_conditional_tags(zipkin_span, span_data, tags, service_name)
|
92
92
|
zipkin_span['tags'] = tags unless tags.empty?
|
93
93
|
zipkin_span['kind'] = KIND_MAP[span_data.kind] unless span_data.kind.nil?
|
94
|
-
zipkin_span['parentId'] = span_data.
|
94
|
+
zipkin_span['parentId'] = span_data.hex_parent_span_id unless span_data.parent_span_id == OpenTelemetry::Trace::INVALID_SPAN_ID
|
95
95
|
zipkin_span['localEndpoint'] = endpoint_from_tags(tags, (span_data.attributes && span_data.attributes[SERVICE_NAME_ATTRIBUTE_KEY]) || service_name)
|
96
96
|
# remote endpoint logic https://github.com/open-telemetry/opentelemetry-collector/blob/347cfa9ab21d47240128c58c9bafcc0014bc729d/translator/trace/zipkin/traces_to_zipkinv2.go#L284
|
97
97
|
zipkin_span['remoteEndpoint'] = endpoint_from_tags(tags, nil)
|
@@ -107,12 +107,12 @@ module OpenTelemetry
|
|
107
107
|
events = span_data.events.map do |event|
|
108
108
|
if event.attributes.keys.length.zero?
|
109
109
|
{
|
110
|
-
timestamp: (event.timestamp
|
110
|
+
timestamp: (event.timestamp / 1_000).to_s,
|
111
111
|
value: event.name
|
112
112
|
}
|
113
113
|
else
|
114
114
|
{
|
115
|
-
timestamp: (event.timestamp
|
115
|
+
timestamp: (event.timestamp / 1_000).to_s,
|
116
116
|
value: { event.name => event.attributes.transform_values(&:to_s) }.to_json
|
117
117
|
}
|
118
118
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-exporter-zipkin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.19.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTelemetry Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
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: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: opentelemetry-common
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.19.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.19.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: opentelemetry-sdk
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '1.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '1.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,10 +198,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
198
198
|
licenses:
|
199
199
|
- Apache-2.0
|
200
200
|
metadata:
|
201
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-zipkin/v0.
|
201
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-zipkin/v0.19.2/file.CHANGELOG.html
|
202
202
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/exporter/zipkin
|
203
203
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
204
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-zipkin/v0.
|
204
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-zipkin/v0.19.2
|
205
205
|
post_install_message:
|
206
206
|
rdoc_options: []
|
207
207
|
require_paths:
|