opentelemetry-instrumentation-excon 0.14.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -10
- data/README.md +2 -2
- 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: 005e5b38cc8b566c7f6c78c5aec61d65e365cbb396a1e54ddec08c975a52473f
|
4
|
+
data.tar.gz: 9ccba23fad115249c377e6bcb8455d033bf36eea439ccab49b3c1385f8d8e4cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f99beff1b5aac38dbb3cd8973ac31f1a82b30372d8696e08f986e362cbc31072ddfc071642878133da901afbf14ba7b346db41dcdbc8c08954abb6a7da42c67
|
7
|
+
data.tar.gz: d03898592edf5ad116e15de68b9afd0c73ff3e0ce5668c57b46d06a6c5e380f2e8dadda83f1259e25d83fba3f725e28d07deb2b223577a51f8f71d11b6f7249c
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,35 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-excon
|
2
2
|
|
3
|
+
### v0.19.0 / 2021-06-23
|
4
|
+
|
5
|
+
* BREAKING CHANGE: Total order constraint on span.status=
|
6
|
+
|
7
|
+
* FIXED: Total order constraint on span.status=
|
8
|
+
|
9
|
+
### v0.18.0 / 2021-05-21
|
10
|
+
|
11
|
+
* ADDED: Updated API depedency for 1.0.0.rc1
|
12
|
+
* FIXED: Removed http.status_text attribute #750
|
13
|
+
|
14
|
+
### v0.17.0 / 2021-04-22
|
15
|
+
|
16
|
+
* ADDED: Excon instrumentation accepts peer service config attribute.
|
17
|
+
* FIXED: Refactor propagators to add #fields
|
18
|
+
|
19
|
+
### v0.16.0 / 2021-03-17
|
20
|
+
|
21
|
+
* FIXED: Example scripts now reference local common lib
|
22
|
+
* DOCS: Replace Gitter with GitHub Discussions
|
23
|
+
|
24
|
+
### v0.15.0 / 2021-02-18
|
25
|
+
|
26
|
+
* (No significant changes)
|
27
|
+
|
3
28
|
### v0.14.0 / 2021-02-03
|
4
29
|
|
5
|
-
* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
|
30
|
+
* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
|
6
31
|
|
7
|
-
* ADDED: Replace getter and setter callables and remove rack specific propagators
|
32
|
+
* ADDED: Replace getter and setter callables and remove rack specific propagators
|
8
33
|
|
9
34
|
### v0.13.0 / 2021-01-29
|
10
35
|
|
@@ -16,7 +41,7 @@
|
|
16
41
|
|
17
42
|
### v0.11.0 / 2020-12-11
|
18
43
|
|
19
|
-
* FIXED: Copyright comments to not reference year
|
44
|
+
* FIXED: Copyright comments to not reference year
|
20
45
|
|
21
46
|
### v0.10.0 / 2020-12-03
|
22
47
|
|
@@ -24,21 +49,21 @@
|
|
24
49
|
|
25
50
|
### v0.9.0 / 2020-11-27
|
26
51
|
|
27
|
-
* BREAKING CHANGE: Add timeout for force_flush and shutdown
|
52
|
+
* BREAKING CHANGE: Add timeout for force_flush and shutdown
|
28
53
|
|
29
|
-
* ADDED: Add timeout for force_flush and shutdown
|
54
|
+
* ADDED: Add timeout for force_flush and shutdown
|
30
55
|
|
31
56
|
### v0.8.0 / 2020-10-27
|
32
57
|
|
33
|
-
* BREAKING CHANGE: Move context/span methods to Trace module
|
34
|
-
* BREAKING CHANGE: Remove 'canonical' from status codes
|
58
|
+
* BREAKING CHANGE: Move context/span methods to Trace module
|
59
|
+
* BREAKING CHANGE: Remove 'canonical' from status codes
|
35
60
|
|
36
|
-
* FIXED: Move context/span methods to Trace module
|
37
|
-
* FIXED: Remove 'canonical' from status codes
|
61
|
+
* FIXED: Move context/span methods to Trace module
|
62
|
+
* FIXED: Remove 'canonical' from status codes
|
38
63
|
|
39
64
|
### v0.7.0 / 2020-10-07
|
40
65
|
|
41
|
-
* DOCS: Standardize toplevel docs structure and readme
|
66
|
+
* DOCS: Standardize toplevel docs structure and readme
|
42
67
|
|
43
68
|
### v0.6.0 / 2020-09-10
|
44
69
|
|
data/README.md
CHANGED
@@ -35,7 +35,7 @@ end
|
|
35
35
|
|
36
36
|
The `opentelemetry-instrumentation-excon` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
|
37
37
|
|
38
|
-
The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us
|
38
|
+
The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us in [GitHub Discussions][discussions-url] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
|
39
39
|
|
40
40
|
## License
|
41
41
|
|
@@ -47,4 +47,4 @@ The `opentelemetry-instrumentation-all` gem is distributed under the Apache 2.0
|
|
47
47
|
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/main/LICENSE
|
48
48
|
[ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
|
49
49
|
[community-meetings]: https://github.com/open-telemetry/community#community-meetings
|
50
|
-
[
|
50
|
+
[discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
|
@@ -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.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-06-24 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.rc2
|
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.rc2
|
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.0
|
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.0
|
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.1
|
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.1
|
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.0/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.0
|
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
|