opentelemetry-common 0.19.5 → 0.19.6

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: 58a2d895adece2c6a96be7355362c2bc630da33eced02fad36f25ccb6f9dd543
4
- data.tar.gz: 1db1cbe0cd4f566e7f96e475f25de913d639780a44bce94b3e40875fd813cc92
3
+ metadata.gz: 286a98f703c4c88fa99e50dc57c30aa2d49ca4eef437a7ea3151ff904ea16dfc
4
+ data.tar.gz: b6cbfd1808ff51e47600dc27e6093d903b42c7c04ca5333114ad8447a269563c
5
5
  SHA512:
6
- metadata.gz: 836efd569b9efae0067951776782942b1d378232d80f29c7c8ddb7319f1d786b06b3f08cf741eb821adc0463bb09269249d656d9db5c63be1956bb7a2d850791
7
- data.tar.gz: b42f204f66bb84eb28302ecff3135c0dea6c462e78e6e7b5a6e7244440a8aa6818d274b933995b4fba397ef6db4b52e706198dbadf13507a5df431e0d4aa8f01
6
+ metadata.gz: 694e7ed9f4a0c0ea9463c9bce044d16ea2ebdb6805d6d6cdb4c66dac1f5e1c2066951b4b30afd5455afd1bc49c2f7bd9804a50ac90ba873a133fedea5627a282
7
+ data.tar.gz: a3c5598137f319384f48196f529b2c627b4ed302d646dab2849c29db8171ed9f0c1f866b82751508da9a259b0fe73f85a8baf6c02bcfa171292a9152afe80920
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-common
2
2
 
3
+ ### v0.19.6 / 2022-05-18
4
+
5
+ * (No significant changes)
6
+
3
7
  ### v0.19.5 / 2022-05-10
4
8
 
5
9
  * FIXED: Common changelog
@@ -101,6 +101,32 @@ module OpenTelemetry
101
101
  url
102
102
  end
103
103
 
104
+ # Returns the first non nil environment variable requested,
105
+ # or the default value if provided.
106
+ #
107
+ # @param [String] env_vars The environment variable(s) to retrieve
108
+ # @param default The fallback value to return if the requested
109
+ # env var(s) are not present
110
+ #
111
+ # @returns [String]
112
+ def config_opt(*env_vars, default: nil)
113
+ ENV.values_at(*env_vars).compact.fetch(0, default)
114
+ end
115
+
116
+ # Returns a true if the provided url is valid
117
+ #
118
+ # @param [String] url the URL string to test validity
119
+ #
120
+ # @return [boolean]
121
+ def valid_url?(url)
122
+ return false if url.nil? || url.strip.empty?
123
+
124
+ URI(url)
125
+ true
126
+ rescue URI::InvalidURIError
127
+ false
128
+ end
129
+
104
130
  # Returns true if exporter is a valid exporter.
105
131
  def valid_exporter?(exporter)
106
132
  exporter && %i[export shutdown force_flush].all? { |m| exporter.respond_to?(m) }
@@ -6,6 +6,6 @@
6
6
 
7
7
  module OpenTelemetry
8
8
  module Common
9
- VERSION = '0.19.5'
9
+ VERSION = '0.19.6'
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.5
4
+ version: 0.19.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-10 00:00:00.000000000 Z
11
+ date: 2022-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: opentelemetry-test-helpers
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rake
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -146,10 +160,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
146
160
  licenses:
147
161
  - Apache-2.0
148
162
  metadata:
149
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.19.5/file.CHANGELOG.html
163
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.19.6/file.CHANGELOG.html
150
164
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/common
151
165
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
152
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.19.5
166
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.19.6
153
167
  post_install_message:
154
168
  rdoc_options: []
155
169
  require_paths: