opentelemetry-instrumentation-excon 0.16.0 → 0.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -12
- data/lib/opentelemetry/instrumentation/excon.rb +1 -0
- data/lib/opentelemetry/instrumentation/excon/instrumentation.rb +2 -0
- data/lib/opentelemetry/instrumentation/excon/middlewares/tracer_middleware.rb +20 -19
- data/lib/opentelemetry/instrumentation/excon/version.rb +1 -1
- metadata +37 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f4d1aad3d8bf0d920181dd0c4e5460361e0a75f55969bdf4ef0704c9240ff55
|
4
|
+
data.tar.gz: 42d95d8da754e9a91f15bc06589a6556419f897aac865c5796424a1d17ea0af7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f403b86b55045207f1872b8e81784c53aef595189ae3fb73953298d95a8666ed0e95a7f52b11532894c8b59981d19d04d297f487f4fdc77742e06a090ef35fc
|
7
|
+
data.tar.gz: 7a6494178010eea9e685b2a60892c74904d1c1cc8f0bd90241e0dda339dffabc9583ace6a045475f6cc403277aae6aaba58237aba1f43a7d2b6e02a77e0a432b
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,29 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-excon
|
2
2
|
|
3
|
+
### v0.19.1 / 2021-08-12
|
4
|
+
|
5
|
+
* DOCS: Update docs to rely more on environment variable configuration
|
6
|
+
|
7
|
+
### v0.19.0 / 2021-06-23
|
8
|
+
|
9
|
+
* BREAKING CHANGE: Total order constraint on span.status=
|
10
|
+
|
11
|
+
* FIXED: Total order constraint on span.status=
|
12
|
+
|
13
|
+
### v0.18.0 / 2021-05-21
|
14
|
+
|
15
|
+
* ADDED: Updated API depedency for 1.0.0.rc1
|
16
|
+
* FIXED: Removed http.status_text attribute #750
|
17
|
+
|
18
|
+
### v0.17.0 / 2021-04-22
|
19
|
+
|
20
|
+
* ADDED: Excon instrumentation accepts peer service config attribute.
|
21
|
+
* FIXED: Refactor propagators to add #fields
|
22
|
+
|
3
23
|
### v0.16.0 / 2021-03-17
|
4
24
|
|
5
|
-
* FIXED: Example scripts now reference local common lib
|
6
|
-
* DOCS: Replace Gitter with GitHub Discussions
|
25
|
+
* FIXED: Example scripts now reference local common lib
|
26
|
+
* DOCS: Replace Gitter with GitHub Discussions
|
7
27
|
|
8
28
|
### v0.15.0 / 2021-02-18
|
9
29
|
|
@@ -11,9 +31,9 @@
|
|
11
31
|
|
12
32
|
### v0.14.0 / 2021-02-03
|
13
33
|
|
14
|
-
* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
|
34
|
+
* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
|
15
35
|
|
16
|
-
* ADDED: Replace getter and setter callables and remove rack specific propagators
|
36
|
+
* ADDED: Replace getter and setter callables and remove rack specific propagators
|
17
37
|
|
18
38
|
### v0.13.0 / 2021-01-29
|
19
39
|
|
@@ -25,7 +45,7 @@
|
|
25
45
|
|
26
46
|
### v0.11.0 / 2020-12-11
|
27
47
|
|
28
|
-
* FIXED: Copyright comments to not reference year
|
48
|
+
* FIXED: Copyright comments to not reference year
|
29
49
|
|
30
50
|
### v0.10.0 / 2020-12-03
|
31
51
|
|
@@ -33,21 +53,21 @@
|
|
33
53
|
|
34
54
|
### v0.9.0 / 2020-11-27
|
35
55
|
|
36
|
-
* BREAKING CHANGE: Add timeout for force_flush and shutdown
|
56
|
+
* BREAKING CHANGE: Add timeout for force_flush and shutdown
|
37
57
|
|
38
|
-
* ADDED: Add timeout for force_flush and shutdown
|
58
|
+
* ADDED: Add timeout for force_flush and shutdown
|
39
59
|
|
40
60
|
### v0.8.0 / 2020-10-27
|
41
61
|
|
42
|
-
* BREAKING CHANGE: Move context/span methods to Trace module
|
43
|
-
* BREAKING CHANGE: Remove 'canonical' from status codes
|
62
|
+
* BREAKING CHANGE: Move context/span methods to Trace module
|
63
|
+
* BREAKING CHANGE: Remove 'canonical' from status codes
|
44
64
|
|
45
|
-
* FIXED: Move context/span methods to Trace module
|
46
|
-
* FIXED: Remove 'canonical' from status codes
|
65
|
+
* FIXED: Move context/span methods to Trace module
|
66
|
+
* FIXED: Remove 'canonical' from status codes
|
47
67
|
|
48
68
|
### v0.7.0 / 2020-10-07
|
49
69
|
|
50
|
-
* DOCS: Standardize toplevel docs structure and readme
|
70
|
+
* DOCS: Standardize toplevel docs structure and readme
|
51
71
|
|
52
72
|
### v0.6.0 / 2020-09-10
|
53
73
|
|
@@ -22,19 +22,14 @@ module OpenTelemetry
|
|
22
22
|
trace: 'TRACE'
|
23
23
|
}.freeze
|
24
24
|
|
25
|
-
def request_call(datum)
|
25
|
+
def request_call(datum)
|
26
26
|
begin
|
27
27
|
unless datum.key?(:otel_span)
|
28
28
|
http_method = HTTP_METHODS_SYMBOL_TO_STRING[datum[:method]]
|
29
|
-
|
29
|
+
attributes = span_creation_attributes(datum, http_method)
|
30
30
|
tracer.start_span(
|
31
31
|
"HTTP #{http_method}",
|
32
|
-
attributes:
|
33
|
-
'http.host' => datum[:host],
|
34
|
-
'http.method' => http_method,
|
35
|
-
'http.scheme' => datum[:scheme],
|
36
|
-
'http.target' => datum[:path]
|
37
|
-
},
|
32
|
+
attributes: attributes,
|
38
33
|
kind: :client
|
39
34
|
).tap do |span|
|
40
35
|
datum[:otel_span] = span
|
@@ -76,7 +71,7 @@ module OpenTelemetry
|
|
76
71
|
|
77
72
|
private
|
78
73
|
|
79
|
-
def handle_response(datum) # rubocop:disable Metrics/AbcSize, Metrics/
|
74
|
+
def handle_response(datum) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity:
|
80
75
|
if datum.key?(:otel_span)
|
81
76
|
datum[:otel_span].tap do |span|
|
82
77
|
return span if span.end_timestamp
|
@@ -84,18 +79,10 @@ module OpenTelemetry
|
|
84
79
|
if datum.key?(:response)
|
85
80
|
response = datum[:response]
|
86
81
|
span.set_attribute('http.status_code', response[:status])
|
87
|
-
span.
|
88
|
-
span.status = OpenTelemetry::Trace::Status.http_to_status(
|
89
|
-
response[:status]
|
90
|
-
)
|
82
|
+
span.status = OpenTelemetry::Trace::Status.error unless (100..399).include?(response[:status].to_i)
|
91
83
|
end
|
92
84
|
|
93
|
-
if datum.key?(:error)
|
94
|
-
span.status = OpenTelemetry::Trace::Status.new(
|
95
|
-
OpenTelemetry::Trace::Status::ERROR,
|
96
|
-
description: "Request has failed: #{datum[:error]}"
|
97
|
-
)
|
98
|
-
end
|
85
|
+
span.status = OpenTelemetry::Trace::Status.error("Request has failed: #{datum[:error]}") if datum.key?(:error)
|
99
86
|
|
100
87
|
span.finish
|
101
88
|
datum.delete(:otel_span)
|
@@ -105,6 +92,20 @@ module OpenTelemetry
|
|
105
92
|
OpenTelemetry.logger.debug(e.message)
|
106
93
|
end
|
107
94
|
|
95
|
+
def span_creation_attributes(datum, http_method)
|
96
|
+
instrumentation_attrs = {
|
97
|
+
'http.host' => datum[:host],
|
98
|
+
'http.method' => http_method,
|
99
|
+
'http.scheme' => datum[:scheme],
|
100
|
+
'http.target' => datum[:path]
|
101
|
+
}
|
102
|
+
config = Excon::Instrumentation.instance.config
|
103
|
+
instrumentation_attrs['peer.service'] = config[:peer_service] if config[:peer_service]
|
104
|
+
instrumentation_attrs.merge(
|
105
|
+
OpenTelemetry::Common::HTTP::ClientContext.attributes
|
106
|
+
)
|
107
|
+
end
|
108
|
+
|
108
109
|
def tracer
|
109
110
|
Excon::Instrumentation.instance.tracer
|
110
111
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-instrumentation-excon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.19.1
|
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: opentelemetry-api
|
@@ -16,14 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 1.0.0.rc3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 1.0.0.rc3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: opentelemetry-common
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.19.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.19.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: opentelemetry-instrumentation-base
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.18.2
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.18.2
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: appraisal
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +114,14 @@ dependencies:
|
|
86
114
|
requirements:
|
87
115
|
- - "~>"
|
88
116
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
117
|
+
version: 1.0.0.rc1
|
90
118
|
type: :development
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
122
|
- - "~>"
|
95
123
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
124
|
+
version: 1.0.0.rc1
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: rubocop
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -185,10 +213,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
185
213
|
licenses:
|
186
214
|
- Apache-2.0
|
187
215
|
metadata:
|
188
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-excon/v0.
|
216
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-excon/v0.19.1/file.CHANGELOG.html
|
189
217
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/excon
|
190
218
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
191
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-excon/v0.
|
219
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-excon/v0.19.1
|
192
220
|
post_install_message:
|
193
221
|
rdoc_options: []
|
194
222
|
require_paths:
|
@@ -204,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
232
|
- !ruby/object:Gem::Version
|
205
233
|
version: '0'
|
206
234
|
requirements: []
|
207
|
-
rubygems_version: 3.1.
|
235
|
+
rubygems_version: 3.1.6
|
208
236
|
signing_key:
|
209
237
|
specification_version: 4
|
210
238
|
summary: Excon instrumentation for the OpenTelemetry framework
|