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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/opentelemetry/common/utilities.rb +26 -0
- data/lib/opentelemetry/common/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 286a98f703c4c88fa99e50dc57c30aa2d49ca4eef437a7ea3151ff904ea16dfc
|
4
|
+
data.tar.gz: b6cbfd1808ff51e47600dc27e6093d903b42c7c04ca5333114ad8447a269563c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 694e7ed9f4a0c0ea9463c9bce044d16ea2ebdb6805d6d6cdb4c66dac1f5e1c2066951b4b30afd5455afd1bc49c2f7bd9804a50ac90ba873a133fedea5627a282
|
7
|
+
data.tar.gz: a3c5598137f319384f48196f529b2c627b4ed302d646dab2849c29db8171ed9f0c1f866b82751508da9a259b0fe73f85a8baf6c02bcfa171292a9152afe80920
|
data/CHANGELOG.md
CHANGED
@@ -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) }
|
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.
|
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-
|
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.
|
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.
|
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:
|