opentelemetry-resource_detectors 0.18.1 → 0.19.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e4a5f54a1144c44a8b7251ded0a525c671877fb2465acc119fd781e3e6de143
|
4
|
+
data.tar.gz: 4cfac5fe3c9702bcad97ab95efe72b376a27f105f6d3e83c3d18bdc032e64c94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a02d9e3bb0e1aed166851d79d4e8378dd4cb5c5fa267bee579cc8c303756c32450207b1e0b79717580896b50d56b3cf2100bb5e03d60405ea54106bc5f57acbd
|
7
|
+
data.tar.gz: 5dcbbb0cdff2b11ad4ccd84a70f9338782c525a2aaae3e0f46caeeb388c8851458e1fa219baf006dce856a055ff6fa585954a72ba8f38e03022327b19b839b82
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Release History: opentelemetry-resource_detectors
|
2
2
|
|
3
|
+
### v0.19.0 / 2021-08-12
|
4
|
+
|
5
|
+
* BREAKING CHANGE: Use auto-generated resource constants in sdk and resource_detectors
|
6
|
+
|
7
|
+
* ADDED: Use auto-generated resource constants in sdk and resource_detectors
|
8
|
+
|
3
9
|
### v0.18.1 / 2021-06-23
|
4
10
|
|
5
11
|
* (No significant changes)
|
@@ -16,27 +16,26 @@ module OpenTelemetry
|
|
16
16
|
def detect # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
|
17
17
|
gcp_env = Google::Cloud::Env.new
|
18
18
|
resource_attributes = {}
|
19
|
-
resource_constants = OpenTelemetry::SDK::Resources::Constants
|
20
19
|
|
21
20
|
if gcp_env.compute_engine?
|
22
|
-
resource_attributes[
|
23
|
-
resource_attributes[
|
24
|
-
resource_attributes[
|
25
|
-
resource_attributes[
|
26
|
-
|
27
|
-
resource_attributes[
|
28
|
-
resource_attributes[
|
29
|
-
|
30
|
-
|
21
|
+
resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_PROVIDER] = 'gcp'
|
22
|
+
resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_ACCOUNT_ID] = gcp_env.project_id
|
23
|
+
resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_REGION] = gcp_env.instance_attribute('cluster-location')
|
24
|
+
resource_attributes[OpenTelemetry::SemanticConventions::Resource::CLOUD_AVAILABILITY_ZONE] = gcp_env.instance_zone
|
25
|
+
|
26
|
+
resource_attributes[OpenTelemetry::SemanticConventions::Resource::HOST_ID] = gcp_env.lookup_metadata('instance', 'id')
|
27
|
+
resource_attributes[OpenTelemetry::SemanticConventions::Resource::HOST_NAME] = ENV['HOSTNAME'] ||
|
28
|
+
gcp_env.lookup_metadata('instance', 'hostname') ||
|
29
|
+
safe_gethostname
|
31
30
|
end
|
32
31
|
|
33
32
|
if gcp_env.kubernetes_engine?
|
34
|
-
resource_attributes[
|
35
|
-
resource_attributes[
|
36
|
-
resource_attributes[
|
37
|
-
resource_attributes[
|
33
|
+
resource_attributes[OpenTelemetry::SemanticConventions::Resource::K8S_CLUSTER_NAME] = gcp_env.instance_attribute('cluster-name')
|
34
|
+
resource_attributes[OpenTelemetry::SemanticConventions::Resource::K8S_NAMESPACE_NAME] = gcp_env.kubernetes_engine_namespace_id
|
35
|
+
resource_attributes[OpenTelemetry::SemanticConventions::Resource::K8S_POD_NAME] = ENV['HOSTNAME'] || safe_gethostname
|
36
|
+
resource_attributes[OpenTelemetry::SemanticConventions::Resource::K8S_NODE_NAME] = gcp_env.lookup_metadata('instance', 'hostname')
|
38
37
|
|
39
|
-
resource_attributes[
|
38
|
+
resource_attributes[OpenTelemetry::SemanticConventions::Resource::CONTAINER_NAME] = ENV['CONTAINER_NAME']
|
40
39
|
end
|
41
40
|
|
42
41
|
resource_attributes.delete_if { |_key, value| value.nil? || value.empty? }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-resource_detectors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.19.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-
|
11
|
+
date: 2021-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-env
|
@@ -156,10 +156,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
156
156
|
licenses:
|
157
157
|
- Apache-2.0
|
158
158
|
metadata:
|
159
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-resource_detectors/v0.
|
159
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-resource_detectors/v0.19.0/file.CHANGELOG.html
|
160
160
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/resource_detectors
|
161
161
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
162
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-resource_detectors/v0.
|
162
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-resource_detectors/v0.19.0
|
163
163
|
post_install_message:
|
164
164
|
rdoc_options: []
|
165
165
|
require_paths:
|