opentelemetry-instrumentation-grape 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76f844ae214dda861b260b1645b7287b2883b7546458ef98c9aa7efcf9635a3e
|
|
4
|
+
data.tar.gz: 9bc20831e6454efcf520bdba125426345ade8fa740e95961e6a6aee9cca0ee78
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00bfa821e44d620ffb90ea81fcf1d7a64ea20084e979c8c1fca03eb548c3814c9e10b0161f3d59da8da5df4c249e42314eec2be5c35e386bd6de33b5f234af22
|
|
7
|
+
data.tar.gz: 02ef55b514b1e61f8659cc76824e72b85f0ea5f7e04933733386c8eed315287fd2e64db4b2d989c17d066c46597c9c7052892a2863c4b2a66c8dcac8d83f7236
|
data/CHANGELOG.md
CHANGED
|
@@ -67,10 +67,12 @@ module OpenTelemetry
|
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
def attributes_from_grape_endpoint(endpoint)
|
|
70
|
-
{
|
|
71
|
-
OpenTelemetry::SemanticConventions::Trace::CODE_NAMESPACE => endpoint.options[:for]&.instance_variable_get(:@base)&.to_s,
|
|
70
|
+
attributes = {
|
|
72
71
|
OpenTelemetry::SemanticConventions::Trace::HTTP_ROUTE => path(endpoint)
|
|
73
72
|
}
|
|
73
|
+
code_namespace = code_namespace(endpoint)
|
|
74
|
+
attributes[OpenTelemetry::SemanticConventions::Trace::CODE_NAMESPACE] = code_namespace if code_namespace
|
|
75
|
+
attributes
|
|
74
76
|
end
|
|
75
77
|
|
|
76
78
|
# ActiveSupport::Notifications will attach a `:exception_object` to the payload if there was
|
|
@@ -89,6 +91,14 @@ module OpenTelemetry
|
|
|
89
91
|
endpoint.options[:method]&.first
|
|
90
92
|
end
|
|
91
93
|
|
|
94
|
+
def code_namespace(endpoint)
|
|
95
|
+
owner = endpoint.options[:for]
|
|
96
|
+
return unless owner
|
|
97
|
+
|
|
98
|
+
base = owner.instance_variable_get(:@base)
|
|
99
|
+
[owner.name, base&.to_s, owner.to_s].find { |value| value && !value.empty? }
|
|
100
|
+
end
|
|
101
|
+
|
|
92
102
|
def path(endpoint)
|
|
93
103
|
return '' unless endpoint.routes
|
|
94
104
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: opentelemetry-instrumentation-grape
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenTelemetry Authors
|
|
@@ -45,10 +45,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
|
|
|
45
45
|
licenses:
|
|
46
46
|
- Apache-2.0
|
|
47
47
|
metadata:
|
|
48
|
-
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-grape/0.7.
|
|
49
|
-
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/opentelemetry-instrumentation-grape/v0.7.
|
|
48
|
+
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-grape/0.7.1/file/CHANGELOG.md
|
|
49
|
+
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/opentelemetry-instrumentation-grape/v0.7.1/instrumentation/grape
|
|
50
50
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
|
51
|
-
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-grape/0.7.
|
|
51
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-grape/0.7.1
|
|
52
52
|
rdoc_options: []
|
|
53
53
|
require_paths:
|
|
54
54
|
- lib
|
|
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
63
63
|
- !ruby/object:Gem::Version
|
|
64
64
|
version: '0'
|
|
65
65
|
requirements: []
|
|
66
|
-
rubygems_version: 4.0.
|
|
66
|
+
rubygems_version: 4.0.10
|
|
67
67
|
specification_version: 4
|
|
68
68
|
summary: Grape instrumentation for the OpenTelemetry framework
|
|
69
69
|
test_files: []
|