opentelemetry-exporter-jaeger 0.8.0 → 0.9.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: ef11e9bffe5473b6c509d6b0b146734425a45c861fe1b6b4497157c056a1d8e5
4
- data.tar.gz: 0fd8eeea6fd343d977791239b48a621e34ec60617d6adcdc6df163c216326cdb
3
+ metadata.gz: ff3e295af2d720dbda1545d1bb943978ee7e03c446107bf8df4f0951600230c9
4
+ data.tar.gz: e7c4c9f93544d01e6f686e8c6b4b07a944e0c1a05fa230f82f4a6b651089af43
5
5
  SHA512:
6
- metadata.gz: f641e6bdb691090b6588f8122eef54c5287562aab81806a7fc6d765a419a5f09183821ea04656354a3938ad8934cd7823bb87564318a0837612d697dc1628c6f
7
- data.tar.gz: ec0199b2c69385778196d7b4a252cb3f8a40bd98461d66dd71384b80edf4eb7521301c784e7ff7d2a9f40bf40eb88a4d16b57e708ab91afb266bdf5ad6129b2e
6
+ metadata.gz: 24f2b7dc6dfb9f229e9a1a9d3fc9cf6ba95d921d30bdc4eb448a977049439941f6dcee38ffdafc3a2d22014449c7c490f782b866384bf404dfe3724accf92e49
7
+ data.tar.gz: 67aaa51104a97e76b33c71459d53e4fb3ec4a0dab8a5e7c5fd5efc2fd5736312c84675c9d31ea2a04ff300da95201f56cc31009de0e6b033e2b97bb1bf1a28c4
@@ -1,5 +1,11 @@
1
1
  # Release History: opentelemetry-exporter-jaeger
2
2
 
3
+ ### v0.9.0 / 2020-11-27
4
+
5
+ * BREAKING CHANGE: Add timeout for force_flush and shutdown
6
+
7
+ * ADDED: Add timeout for force_flush and shutdown
8
+
3
9
  ### v0.8.0 / 2020-10-27
4
10
 
5
11
  * BREAKING CHANGE: Move context/span methods to Trace module
@@ -23,6 +23,7 @@ $LOAD_PATH.push(File.dirname(__FILE__) + '/../../../thrift/gen-rb')
23
23
  require 'agent'
24
24
  require 'collector'
25
25
  require 'opentelemetry/sdk'
26
+ require 'opentelemetry/common'
26
27
  require 'socket'
27
28
  require 'opentelemetry/exporter/jaeger/encoder'
28
29
  require 'opentelemetry/exporter/jaeger/transport'
@@ -30,12 +30,14 @@ module OpenTelemetry
30
30
  # @param [Enumerable<OpenTelemetry::SDK::Trace::SpanData>] span_data the
31
31
  # list of recorded {OpenTelemetry::SDK::Trace::SpanData} structs to be
32
32
  # exported.
33
+ # @param [optional Numeric] timeout An optional timeout in seconds.
33
34
  # @return [Integer] the result of the export.
34
- def export(span_data)
35
+ def export(span_data, timeout: nil)
35
36
  return FAILURE if @shutdown
36
37
 
38
+ start_time = Time.now
37
39
  encoded_batches(span_data) do |batch|
38
- return FAILURE if @shutdown
40
+ return FAILURE if @shutdown || OpenTelemetry::Common::Utilities.maybe_timeout(timeout, start_time)&.zero?
39
41
 
40
42
  @client.emitBatch(batch)
41
43
  end
@@ -44,7 +46,9 @@ module OpenTelemetry
44
46
  # Called when {OpenTelemetry::SDK::Trace::Tracer#shutdown} is called, if
45
47
  # this exporter is registered to a {OpenTelemetry::SDK::Trace::Tracer}
46
48
  # object.
47
- def shutdown
49
+ #
50
+ # @param [optional Numeric] timeout An optional timeout in seconds.
51
+ def shutdown(timeout: nil)
48
52
  @shutdown = true
49
53
  end
50
54
 
@@ -36,8 +36,9 @@ module OpenTelemetry
36
36
  # @param [Enumerable<OpenTelemetry::SDK::Trace::SpanData>] span_data the
37
37
  # list of recorded {OpenTelemetry::SDK::Trace::SpanData} structs to be
38
38
  # exported.
39
+ # @param [optional Numeric] timeout An optional timeout in seconds.
39
40
  # @return [Integer] the result of the export.
40
- def export(span_data)
41
+ def export(span_data, timeout: nil)
41
42
  return FAILURE if @shutdown
42
43
 
43
44
  encoded_batches(span_data).each do |batch|
@@ -56,7 +57,9 @@ module OpenTelemetry
56
57
  # Called when {OpenTelemetry::SDK::Trace::Tracer#shutdown} is called, if
57
58
  # this exporter is registered to a {OpenTelemetry::SDK::Trace::Tracer}
58
59
  # object.
59
- def shutdown
60
+ #
61
+ # @param [optional Numeric] timeout An optional timeout in seconds.
62
+ def shutdown(timeout: nil)
60
63
  @shutdown = true
61
64
  end
62
65
 
@@ -8,7 +8,7 @@ module OpenTelemetry
8
8
  module Exporter
9
9
  module Jaeger
10
10
  ## Current OpenTelemetry Jaeger exporter version
11
- VERSION = '0.8.0'
11
+ VERSION = '0.9.0'
12
12
  end
13
13
  end
14
14
  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.8.0
4
+ version: 0.9.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: 2020-10-27 00:00:00.000000000 Z
11
+ date: 2020-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.8.0
19
+ version: 0.9.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: 0.8.0
26
+ version: 0.9.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: opentelemetry-common
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.9.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.9.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: thrift
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -195,10 +209,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
195
209
  licenses:
196
210
  - Apache-2.0
197
211
  metadata:
198
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-jaeger/v0.8.0/file.CHANGELOG.html
212
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-jaeger/v0.9.0/file.CHANGELOG.html
199
213
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/master/exporter/jaeger
200
214
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
201
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-jaeger/v0.8.0
215
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-jaeger/v0.9.0
202
216
  post_install_message:
203
217
  rdoc_options: []
204
218
  require_paths: