opentelemetry-exporter-otlp 0.14.0 → 0.15.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: 34a61cff86886f8c7f613a563002bc1259278565cb95dfb5cc445790d17ddc0d
4
- data.tar.gz: faa25394d4f4124c9a30dcf1d3b7b278c58642f6f3ac9182c04f19f8952767ec
3
+ metadata.gz: f159226c741682d13922c5341f78022583975977c78702972867445edefcc2d6
4
+ data.tar.gz: 4adc231af3cf396b9208d9de07830c3ea618dbbbc3dbf623c42a83e0fd180158
5
5
  SHA512:
6
- metadata.gz: 447e268c0a5c7e68d41a1686d8a9567e5de4eca855fcbdd45c1a3b98ff4dee7dff1988a4acb9915d53c0aa43ff46d31f2167405b1d8b8d1eac300484c2c96660
7
- data.tar.gz: 37cd86ddea7a477a0f96b2050aacc39cd4e376c6983464069e177d54f34aa00ecb833b869afe04ba82f3de8ea35266a7c38ee27690e1fe530bdf27aac6555576
6
+ metadata.gz: de253bbeb04969193f98f92eeef816d986f2a0af7a979d0c542e16269dc5b2257eecd57cbfacf452d88eba93853e03afccc08221759e2ff275430730c7204d03
7
+ data.tar.gz: 30f0442ec56900a463c3a83958560e4aa3ebf068e96ea7aef5825a9d6ed358c4a081966e83a17dc9569494764e1e34b27a6b0f31b5f7b713caf5b27ab2685660
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Release History: opentelemetry-exporter-otlp
2
2
 
3
+ ### v0.15.0 / 2021-02-18
4
+
5
+ * BREAKING CHANGE: Streamline processor pipeline
6
+
7
+ * ADDED: Add otlp exporter hooks
8
+ * FIXED: Streamline processor pipeline
9
+
3
10
  ### v0.14.0 / 2021-02-03
4
11
 
5
12
  * (No significant changes)
data/README.md CHANGED
@@ -39,7 +39,7 @@ require 'opentelemetry/exporter/otlp'
39
39
  OpenTelemetry::SDK.configure do |c|
40
40
  c.add_span_processor(
41
41
  OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
42
- exporter: OpenTelemetry::Exporter::OTLP::Exporter.new(
42
+ OpenTelemetry::Exporter::OTLP::Exporter.new(
43
43
  endpoint: 'http://localhost:55680'
44
44
  )
45
45
  )
@@ -41,18 +41,18 @@ module OpenTelemetry
41
41
  raise ArgumentError, "unsupported compression key #{compression}" unless compression.nil? || compression == 'gzip'
42
42
  raise ArgumentError, 'headers must be comma-separated k=v pairs or a Hash' unless valid_headers?(headers)
43
43
 
44
- uri = if endpoint == ENV['OTEL_EXPORTER_OTLP_ENDPOINT']
45
- URI("#{endpoint}/v1/traces")
46
- else
47
- URI(endpoint)
48
- end
49
-
50
- @http = Net::HTTP.new(uri.host, uri.port)
51
- @http.use_ssl = uri.scheme == 'https'
44
+ @uri = if endpoint == ENV['OTEL_EXPORTER_OTLP_ENDPOINT']
45
+ URI("#{endpoint}/v1/traces")
46
+ else
47
+ URI(endpoint)
48
+ end
49
+
50
+ @http = Net::HTTP.new(@uri.host, @uri.port)
51
+ @http.use_ssl = @uri.scheme == 'https'
52
52
  @http.ca_file = certificate_file unless certificate_file.nil?
53
53
  @http.keep_alive_timeout = KEEP_ALIVE_TIMEOUT
54
54
 
55
- @path = uri.path
55
+ @path = @uri.path
56
56
  @headers = case headers
57
57
  when String then CSV.parse(headers, col_sep: '=', row_sep: ',').to_h
58
58
  when Hash then headers
@@ -60,7 +60,6 @@ module OpenTelemetry
60
60
  @timeout = timeout.to_f
61
61
  @compression = compression
62
62
  @metrics_reporter = metrics_reporter || OpenTelemetry::SDK::Trace::Export::MetricsReporter
63
-
64
63
  @shutdown = false
65
64
  end
66
65
 
@@ -116,11 +115,22 @@ module OpenTelemetry
116
115
  true
117
116
  end
118
117
 
118
+ # The around_request is a private method that provides an extension
119
+ # point for the exporters network calls. The default behaviour
120
+ # is to not trace these operations.
121
+ #
122
+ # An example use case would be to prepend a patch, or extend this class
123
+ # and override this method's behaviour to explicitly trace the HTTP request.
124
+ # This would allow you to trace your export pipeline.
125
+ def around_request
126
+ OpenTelemetry::Common::Utilities.untraced { yield }
127
+ end
128
+
119
129
  def send_bytes(bytes, timeout:) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
120
130
  retry_count = 0
121
131
  timeout ||= @timeout
122
132
  start_time = Time.now
123
- OpenTelemetry::Common::Utilities.untraced do # rubocop:disable Metrics/BlockLength
133
+ around_request do # rubocop:disable Metrics/BlockLength
124
134
  request = Net::HTTP::Post.new(@path)
125
135
  request.body = if @compression == 'gzip'
126
136
  request.add_field('Content-Encoding', 'gzip')
@@ -8,7 +8,7 @@ module OpenTelemetry
8
8
  module Exporter
9
9
  module OTLP
10
10
  ## Current OpenTelemetry OTLP exporter version
11
- VERSION = '0.14.0'
11
+ VERSION = '0.15.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-otlp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.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-02-03 00:00:00.000000000 Z
11
+ date: 2021-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.14.0
33
+ version: 0.15.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.14.0
40
+ version: 0.15.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: opentelemetry-common
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.14.0
47
+ version: 0.15.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: 0.14.0
54
+ version: 0.15.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -201,10 +201,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
201
201
  licenses:
202
202
  - Apache-2.0
203
203
  metadata:
204
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.14.0/file.CHANGELOG.html
204
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.15.0/file.CHANGELOG.html
205
205
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/exporter/otlp
206
206
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
207
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.14.0
207
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.15.0
208
208
  post_install_message:
209
209
  rdoc_options: []
210
210
  require_paths: