opentelemetry-exporter-otlp 0.28.1 → 0.29.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: 239c0604c4decf8b32af47dc1e178607e55ac5c6da69819435ff12860871fda2
4
- data.tar.gz: 221a3fca20e8342b5948016dfd7d2e67b394fdcff6d4f491bfe05087322a3f38
3
+ metadata.gz: 32c56e204bfb604ef2808828160131ffc959afea396439f6618ca53008844eed
4
+ data.tar.gz: 6e472ba246caff69859e059f40af190a360abecefeee1a177b83b7d7781a3688
5
5
  SHA512:
6
- metadata.gz: 0fc38a83ee53a79cfac8e55b0fada4923e0227d74c9a756ffa9dc682d5d360440277aded4c98e6586fafd549bcc5d45125558e082654bfcb318b7074587012d5
7
- data.tar.gz: 2529ae92fbfc51f7e69631e89478bd269e10e7d55382865561eedaae785c17e822b2a8fa63b991798530102ab1263c892f731b8a0ff9b29e367ce89bef635834
6
+ metadata.gz: 52fbc4098a8130ccc4544f6cd42beb6458d016ab9cdca053a832ae12008306de832f478c9c5eca6d13dfb5f92c037112311fdb45e6566d34c650d1e3e60fcca7
7
+ data.tar.gz: ce8a97c3a58f1d353203e0bcba363338ab12bd961bafe8b27c69900a6a3490964f6c036193f6491a21f1bc704bfc8e02bf05e0575802809b7a0e7780b5211889
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-exporter-otlp
2
2
 
3
+ ### v0.29.0 / 2024-08-27
4
+
5
+ * ADDED: Add support for mutual TLS.
6
+
3
7
  ### v0.28.1 / 2024-07-24
4
8
 
5
9
  * ADDED: Improve SSL error logging.
data/README.md CHANGED
@@ -73,15 +73,17 @@ For additional examples, see the [examples on github][examples-github].
73
73
 
74
74
  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.
75
75
 
76
- | Parameter | Environment variable | Default |
77
- | ------------------- | -------------------------------------------- | ----------------------------------- |
78
- | `endpoint:` | `OTEL_EXPORTER_OTLP_ENDPOINT` | `"http://localhost:4318/v1/traces"` |
79
- | `certificate_file: `| `OTEL_EXPORTER_OTLP_CERTIFICATE` | |
80
- | `headers:` | `OTEL_EXPORTER_OTLP_HEADERS` | |
81
- | `compression:` | `OTEL_EXPORTER_OTLP_COMPRESSION` | `"gzip"` |
82
- | `timeout:` | `OTEL_EXPORTER_OTLP_TIMEOUT` | `10` |
83
- | `ssl_verify_mode:` | `OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_PEER` or | `OpenSSL::SSL:VERIFY_PEER` |
84
- | | `OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_NONE` | |
76
+ | Parameter | Environment variable | Default |
77
+ |---------------------------| -------------------------------------------- | ----------------------------------- |
78
+ | `endpoint:` | `OTEL_EXPORTER_OTLP_ENDPOINT` | `"http://localhost:4318/v1/traces"` |
79
+ | `certificate_file:` | `OTEL_EXPORTER_OTLP_CERTIFICATE` | |
80
+ | `client_certificate_file` | `OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE` | |
81
+ | `client_key_file` | `OTEL_EXPORTER_OTLP_CLIENT_KEY` | |
82
+ | `headers:` | `OTEL_EXPORTER_OTLP_HEADERS` | |
83
+ | `compression:` | `OTEL_EXPORTER_OTLP_COMPRESSION` | `"gzip"` |
84
+ | `timeout:` | `OTEL_EXPORTER_OTLP_TIMEOUT` | `10` |
85
+ | `ssl_verify_mode:` | `OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_PEER` or | `OpenSSL::SSL:VERIFY_PEER` |
86
+ | | `OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_NONE` | |
85
87
 
86
88
  `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.7.6/libdoc/net/http/rdoc/Net/HTTP.html#verify_mode) for more information about these flags.
87
89
 
@@ -97,7 +99,7 @@ The `opentelemetry-exporter-otlp` gem is distributed under the Apache 2.0 licens
97
99
 
98
100
  ## Working with Proto Definitions
99
101
 
100
- The OTel community maintains a [repository with protobuf definitions][otel-proto-github] that language and collector implementors use to generate code.
102
+ The OTel community maintains a [repository with protobuf definitions][otel-proto-github] that language and collector implementers use to generate code.
101
103
 
102
104
  Maintainers are expected to keep up to date with the latest version of protos. This guide will provide you with step-by-step instructions on updating the OTLP Exporter gem with the latest definitions.
103
105
 
@@ -136,7 +138,7 @@ $> bundle exec rake test
136
138
 
137
139
  ```
138
140
 
139
- **Commit the chnages and open a PR!**
141
+ **Commit the changes and open a PR!**
140
142
 
141
143
  [opentelemetry-collector-home]: https://opentelemetry.io/docs/collector/about/
142
144
  [opentelemetry-home]: https://opentelemetry.io
@@ -48,6 +48,8 @@ module OpenTelemetry
48
48
 
49
49
  def initialize(endpoint: nil,
50
50
  certificate_file: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE', 'OTEL_EXPORTER_OTLP_CERTIFICATE'),
51
+ client_certificate_file: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE', 'OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE'),
52
+ client_key_file: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY', 'OTEL_EXPORTER_OTLP_CLIENT_KEY'),
51
53
  ssl_verify_mode: Exporter.ssl_verify_mode,
52
54
  headers: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_HEADERS', 'OTEL_EXPORTER_OTLP_HEADERS', default: {}),
53
55
  compression: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_COMPRESSION', 'OTEL_EXPORTER_OTLP_COMPRESSION', default: 'gzip'),
@@ -57,7 +59,7 @@ module OpenTelemetry
57
59
 
58
60
  raise ArgumentError, "unsupported compression key #{compression}" unless compression.nil? || %w[gzip none].include?(compression)
59
61
 
60
- @http = http_connection(@uri, ssl_verify_mode, certificate_file)
62
+ @http = http_connection(@uri, ssl_verify_mode, certificate_file, client_certificate_file, client_key_file)
61
63
 
62
64
  @path = @uri.path
63
65
  @headers = prepare_headers(headers)
@@ -102,11 +104,13 @@ module OpenTelemetry
102
104
 
103
105
  private
104
106
 
105
- def http_connection(uri, ssl_verify_mode, certificate_file)
107
+ def http_connection(uri, ssl_verify_mode, certificate_file, client_certificate_file, client_key_file)
106
108
  http = Net::HTTP.new(uri.host, uri.port)
107
109
  http.use_ssl = uri.scheme == 'https'
108
110
  http.verify_mode = ssl_verify_mode
109
111
  http.ca_file = certificate_file unless certificate_file.nil?
112
+ http.cert = OpenSSL::X509::Certificate.new(File.read(client_certificate_file)) unless client_certificate_file.nil?
113
+ http.key = OpenSSL::PKey::RSA.new(File.read(client_key_file)) unless client_key_file.nil?
110
114
  http.keep_alive_timeout = KEEP_ALIVE_TIMEOUT
111
115
  http
112
116
  end
@@ -8,7 +8,7 @@ module OpenTelemetry
8
8
  module Exporter
9
9
  module OTLP
10
10
  ## Current OpenTelemetry OTLP exporter version
11
- VERSION = '0.28.1'
11
+ VERSION = '0.29.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.28.1
4
+ version: 0.29.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: 2024-07-24 00:00:00.000000000 Z
11
+ date: 2024-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: googleapis-common-protos-types
@@ -198,14 +198,14 @@ dependencies:
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: '1.3'
201
+ version: '1.65'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: '1.3'
208
+ version: '1.65'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: simplecov
211
211
  requirement: !ruby/object:Gem::Requirement
@@ -289,10 +289,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
289
289
  licenses:
290
290
  - Apache-2.0
291
291
  metadata:
292
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.28.1/file.CHANGELOG.html
292
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.29.0/file.CHANGELOG.html
293
293
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/exporter/otlp
294
294
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
295
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.28.1
295
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.29.0
296
296
  post_install_message:
297
297
  rdoc_options: []
298
298
  require_paths: