opentelemetry-exporter-jaeger 0.13.0 → 0.18.0

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
  SHA256:
3
- metadata.gz: 8d0e654477f44b2ea26f79309a2e97a27c263944cc6b2f0197a9970a761d6bcc
4
- data.tar.gz: 445b71745ce42e3ef5663abca54cd054b36886f77f40057bb959ce237c7c84ae
3
+ metadata.gz: aea1f8e091f974dbb5bfae4d6e9506062db6b15a7d692cb4a62e75c7f17cd293
4
+ data.tar.gz: 64e21515595bc61b93956359efe7e849a6326ba10fe14edadb9f2ee625970af1
5
5
  SHA512:
6
- metadata.gz: 75284455a0a3a2a9f639524fce113c3d293d19e013430d9b352b4618e2c15a1df74b9da618b62ed6968e04f8f16caad1cadd9f55faaa5922d7eff142f6d442a0
7
- data.tar.gz: edee99a7928706c94d48c7498ad431b6d462add2b971f7a3bdee9f16f1350c6d8b92d67c2a4c468aaa5f97ff352da102576c9fb3e78a4a858ad4b5d4a45e4859
6
+ metadata.gz: 2b0454fd14bd43b70cf0047b84d3c39edeffc3c5d8125d7737a2ee38de94f31c1e71997cd0395b036768cd5626bf96645f12c0549e2416384e5016bf1fbe1ade
7
+ data.tar.gz: afb4a85910189015834c6d260a2b1050b914d9092c19b12da2bdc76b25da3b6b38e5467874dc0da1b02f895093c41ce2b8ed3ea291550f9427b29e0b3f347da1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Release History: opentelemetry-exporter-jaeger
2
2
 
3
+ ### v0.18.0 / 2021-05-21
4
+
5
+ * BREAKING CHANGE: Replace Time.now with Process.clock_gettime
6
+
7
+ * ADDED: Export to jaeger collectors w/ self-signed certs
8
+ * FIXED: Replace Time.now with Process.clock_gettime
9
+ * FIXED: Rename constant to hide warning message
10
+ * FIXED: Index a link trace_id in middle rather than end
11
+
12
+ ### v0.17.0 / 2021-04-22
13
+
14
+ * ADDED: Add zipkin exporter
15
+
16
+ ### v0.16.0 / 2021-03-17
17
+
18
+ * BREAKING CHANGE: Implement Exporter#force_flush
19
+
20
+ * ADDED: Implement Exporter#force_flush
21
+ * DOCS: Replace Gitter with GitHub Discussions
22
+
23
+ ### v0.15.0 / 2021-02-18
24
+
25
+ * BREAKING CHANGE: Streamline processor pipeline
26
+
27
+ * FIXED: Streamline processor pipeline
28
+
29
+ ### v0.14.0 / 2021-02-03
30
+
31
+ * (No significant changes)
32
+
3
33
  ### v0.13.0 / 2021-01-29
4
34
 
5
35
  * ADDED: Provide default resource in SDK
data/README.md CHANGED
@@ -35,7 +35,7 @@ require 'opentelemetry/exporter/jaeger'
35
35
  OpenTelemetry::SDK.configure do |c|
36
36
  c.add_span_processor(
37
37
  OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
38
- exporter: OpenTelemetry::Exporter::Jaeger::AgentExporter.new(host: '127.0.0.1', port: 6831)
38
+ OpenTelemetry::Exporter::Jaeger::AgentExporter.new(host: '127.0.0.1', port: 6831)
39
39
  # Alternatively, for the collector exporter:
40
40
  # exporter: OpenTelemetry::Exporter::Jaeger::CollectorExporter.new(endpoint: 'http://192.168.0.1:14268/api/traces')
41
41
  )
@@ -75,17 +75,21 @@ The agent exporter can be configured explicitly in code, as shown above, or via
75
75
 
76
76
  The collector exporter can be configured explicitly in code, as shown above, or via environment variables. The configuration parameters, environment variables, and defaults are shown below.
77
77
 
78
- | Parameter | Environment variable | Default |
79
- | ----------- | ------------------------------- | -------------------------- |
80
- | `endpoint:` | `OTEL_EXPORTER_JAEGER_ENDPOINT` | `"http://localhost:14268"` |
81
- | `username:` | `OTEL_EXPORTER_JAEGER_USER` | `nil` |
82
- | `password:` | `OTEL_EXPORTER_JAEGER_PASSWORD` | `nil` |
78
+ | Parameter | Environment variable | Default |
79
+ | ------------------ | ---------------------------------------------- | -------------------------- |
80
+ | `endpoint:` | `OTEL_EXPORTER_JAEGER_ENDPOINT` | `"http://localhost:14268"` |
81
+ | `username:` | `OTEL_EXPORTER_JAEGER_USER` | `nil` |
82
+ | `password:` | `OTEL_EXPORTER_JAEGER_PASSWORD` | `nil` |
83
+ | `ssl_verify_mode:` | `OTEL_RUBY_EXPORTER_JAEGER_SSL_VERIFY_PEER` or | `OpenSSL::SSL:VERIFY_PEER` |
84
+ | | `OTEL_RUBY_EXPORTER_JAEGER_SSL_VERIFY_NONE` | |
85
+
86
+ `ssl_verify_mode:` parameter values should be flags for server certificate verification: `OpenSSL::SSL:VERIFY_PEER` and `OpenSSL::SSL:VERIFY_NONE` are acceptable. These values can also be set using the appropriately named environment variables as shown where `VERIFY_PEER` will take precedence over `VERIFY_NONE`. Please see [the Net::HTTP docs](https://ruby-doc.org/stdlib-2.5.1/libdoc/net/http/rdoc/Net/HTTP.html#verify_mode) for more information about these flags.
83
87
 
84
88
  ## How can I get involved?
85
89
 
86
90
  The `opentelemetry-exporter-jaeger` gem source is [on github][repo-github], along with related gems including `opentelemetry-sdk`.
87
91
 
88
- The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us on our [gitter channel][ruby-gitter] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
92
+ The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us in [GitHub Discussions][discussions-url] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
89
93
 
90
94
  ## License
91
95
 
@@ -100,4 +104,4 @@ The `opentelemetry-exporter-jaeger` gem is distributed under the Apache 2.0 lice
100
104
  [examples-github]: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/examples
101
105
  [ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
102
106
  [community-meetings]: https://github.com/open-telemetry/community#community-meetings
103
- [ruby-gitter]: https://gitter.im/open-telemetry/opentelemetry-ruby
107
+ [discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
@@ -35,7 +35,7 @@ module OpenTelemetry
35
35
  def export(span_data, timeout: nil)
36
36
  return FAILURE if @shutdown
37
37
 
38
- start_time = Time.now
38
+ start_time = OpenTelemetry::Common::Utilities.timeout_timestamp
39
39
  encoded_batches(span_data) do |batch|
40
40
  return FAILURE if @shutdown || OpenTelemetry::Common::Utilities.maybe_timeout(timeout, start_time)&.zero?
41
41
 
@@ -43,13 +43,23 @@ module OpenTelemetry
43
43
  end
44
44
  end
45
45
 
46
- # Called when {OpenTelemetry::SDK::Trace::Tracer#shutdown} is called, if
47
- # this exporter is registered to a {OpenTelemetry::SDK::Trace::Tracer}
46
+ # Called when {OpenTelemetry::SDK::Trace::TracerProvider#force_flush} is called, if
47
+ # this exporter is registered to a {OpenTelemetry::SDK::Trace::TracerProvider}
48
+ # object.
49
+ #
50
+ # @param [optional Numeric] timeout An optional timeout in seconds.
51
+ def force_flush(timeout: nil)
52
+ SUCCESS
53
+ end
54
+
55
+ # Called when {OpenTelemetry::SDK::Trace::TracerProvider#shutdown} is called, if
56
+ # this exporter is registered to a {OpenTelemetry::SDK::Trace::TracerProvider}
48
57
  # object.
49
58
  #
50
59
  # @param [optional Numeric] timeout An optional timeout in seconds.
51
60
  def shutdown(timeout: nil)
52
61
  @shutdown = true
62
+ SUCCESS
53
63
  end
54
64
 
55
65
  private
@@ -15,13 +15,25 @@ module OpenTelemetry
15
15
  FAILURE = OpenTelemetry::SDK::Trace::Export::FAILURE
16
16
  private_constant(:SUCCESS, :FAILURE)
17
17
 
18
+ def self.ssl_verify_mode
19
+ if ENV.key?('OTEL_RUBY_EXPORTER_JAEGER_SSL_VERIFY_PEER')
20
+ OpenSSL::SSL::VERIFY_PEER
21
+ elsif ENV.key?('OTEL_RUBY_EXPORTER_JAEGER_SSL_VERIFY_NONE')
22
+ OpenSSL::SSL::VERIFY_NONE
23
+ else
24
+ OpenSSL::SSL::VERIFY_PEER
25
+ end
26
+ end
27
+
18
28
  def initialize(endpoint: ENV.fetch('OTEL_EXPORTER_JAEGER_ENDPOINT', 'http://localhost:14268/api/traces'),
19
29
  username: ENV['OTEL_EXPORTER_JAEGER_USER'],
20
- password: ENV['OTEL_EXPORTER_JAEGER_PASSWORD'])
30
+ password: ENV['OTEL_EXPORTER_JAEGER_PASSWORD'],
31
+ ssl_verify_mode: CollectorExporter.ssl_verify_mode)
21
32
  raise ArgumentError, "invalid url for Jaeger::CollectorExporter #{endpoint}" if invalid_url?(endpoint)
22
33
  raise ArgumentError, 'username and password should either both be nil or both be set' if username.nil? != password.nil?
23
34
 
24
- @transport = ::Thrift::HTTPClientTransport.new(endpoint)
35
+ transport_opts = { ssl_verify_mode: Integer(ssl_verify_mode) }
36
+ @transport = ::Thrift::HTTPClientTransport.new(endpoint, transport_opts)
25
37
  unless username.nil? || password.nil?
26
38
  authorization = Base64.strict_encode64("#{username}:#{password}")
27
39
  auth_header = { 'Authorization': "Basic #{authorization}" }
@@ -54,13 +66,23 @@ module OpenTelemetry
54
66
  FAILURE
55
67
  end
56
68
 
57
- # Called when {OpenTelemetry::SDK::Trace::Tracer#shutdown} is called, if
58
- # this exporter is registered to a {OpenTelemetry::SDK::Trace::Tracer}
69
+ # Called when {OpenTelemetry::SDK::Trace::TracerProvider#force_flush} is called, if
70
+ # this exporter is registered to a {OpenTelemetry::SDK::Trace::TracerProvider}
71
+ # object.
72
+ #
73
+ # @param [optional Numeric] timeout An optional timeout in seconds.
74
+ def force_flush(timeout: nil)
75
+ SUCCESS
76
+ end
77
+
78
+ # Called when {OpenTelemetry::SDK::Trace::TracerProvider#shutdown} is called, if
79
+ # this exporter is registered to a {OpenTelemetry::SDK::Trace::TracerProvider}
59
80
  # object.
60
81
  #
61
82
  # @param [optional Numeric] timeout An optional timeout in seconds.
62
83
  def shutdown(timeout: nil)
63
84
  @shutdown = true
85
+ SUCCESS
64
86
  end
65
87
 
66
88
  private
@@ -65,8 +65,8 @@ module OpenTelemetry
65
65
  end
66
66
 
67
67
  def encoded_span(span_data) # rubocop:disable Metrics/AbcSize
68
- start_time = (span_data.start_timestamp.to_f * 1_000_000).to_i
69
- duration = (span_data.end_timestamp.to_f * 1_000_000).to_i - start_time
68
+ start_time = span_data.start_timestamp / 1_000
69
+ duration = span_data.end_timestamp / 1_000 - start_time
70
70
 
71
71
  Thrift::Span.new(
72
72
  'traceIdLow' => int64(span_data.trace_id[8, 8]),
@@ -102,7 +102,7 @@ module OpenTelemetry
102
102
  def encoded_logs(events)
103
103
  events&.map do |event|
104
104
  Thrift::Log.new(
105
- 'timestamp' => (event.timestamp.to_f * 1_000_000).to_i,
105
+ 'timestamp' => event.timestamp / 1_000,
106
106
  'fields' => encoded_tags(event.attributes) + encoded_tags('name' => event.name)
107
107
  )
108
108
  end
@@ -112,8 +112,8 @@ module OpenTelemetry
112
112
  links&.map do |link|
113
113
  Thrift::SpanRef.new(
114
114
  'refType' => Thrift::SpanRefType::FOLLOWS_FROM,
115
- 'traceIdLow' => int64(link.span_context.trace_id[16, 16]),
116
- 'traceIdHigh' => int64(link.span_context.trace_id[0, 16]),
115
+ 'traceIdLow' => int64(link.span_context.trace_id[8, 8]),
116
+ 'traceIdHigh' => int64(link.span_context.trace_id[0, 8]),
117
117
  'spanId' => int64(link.span_context.span_id)
118
118
  )
119
119
  end
@@ -8,7 +8,7 @@ module OpenTelemetry
8
8
  module Exporter
9
9
  module Jaeger
10
10
  ## Current OpenTelemetry Jaeger exporter version
11
- VERSION = '0.13.0'
11
+ VERSION = '0.18.0'
12
12
  end
13
13
  end
14
14
  end
@@ -77,11 +77,11 @@ module OpenTelemetry
77
77
  class Log
78
78
  include ::Thrift::Struct, ::Thrift::Struct_Union
79
79
  TIMESTAMP = 1
80
- FIELDS = 2
80
+ FIELDS_LIST = 2
81
81
 
82
82
  FIELDS = {
83
83
  TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'},
84
- FIELDS => {:type => ::Thrift::Types::LIST, :name => 'fields', :element => {:type => ::Thrift::Types::STRUCT, :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Tag}}
84
+ FIELDS_LIST => {:type => ::Thrift::Types::LIST, :name => 'fields', :element => {:type => ::Thrift::Types::STRUCT, :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Tag}}
85
85
  }
86
86
 
87
87
  def struct_fields; FIELDS; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-exporter-jaeger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.18.0
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-01-30 00:00:00.000000000 Z
11
+ date: 2021-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -16,28 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.13.0
19
+ version: 1.0.0.rc1
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: 0.13.0
26
+ version: 1.0.0.rc1
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.13.0
33
+ version: 0.18.0
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.13.0
40
+ version: 0.18.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: opentelemetry-sdk
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.0.0.rc1
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.0.0.rc1
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: thrift
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -209,10 +223,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
209
223
  licenses:
210
224
  - Apache-2.0
211
225
  metadata:
212
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-jaeger/v0.13.0/file.CHANGELOG.html
226
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-jaeger/v0.18.0/file.CHANGELOG.html
213
227
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/exporter/jaeger
214
228
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
215
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-jaeger/v0.13.0
229
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-jaeger/v0.18.0
216
230
  post_install_message:
217
231
  rdoc_options: []
218
232
  require_paths:
@@ -228,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
242
  - !ruby/object:Gem::Version
229
243
  version: '0'
230
244
  requirements: []
231
- rubygems_version: 3.1.4
245
+ rubygems_version: 3.1.6
232
246
  signing_key:
233
247
  specification_version: 4
234
248
  summary: Jaeger trace exporter for the OpenTelemetry framework