opentelemetry-instrumentation-net_http 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 670e2e325288712b5ef934c6a791fb41d662c339389b7b9387c45cce8c51c7cd
4
- data.tar.gz: a9136b4209f584f8c4fd8d5e5a59c5b292caf1175a19a76f0e4bfc8ec020edf5
3
+ metadata.gz: d62c44e1b6c98d56b3d8d03b012d53e29375ff2e6be98266cacc7a4f83f5c1a7
4
+ data.tar.gz: f28bc101658e0514cf482702a4bd4f2ed43d142c49fd5247be589462a3e9b504
5
5
  SHA512:
6
- metadata.gz: 85ae38a7319a2e768fa7fddcbc972967bae073d8b03ae19cf89bda34713a58fc3c235e9b781215752188414dc30c3db109763f019684d9aff411bb4495309139
7
- data.tar.gz: a2e7a7c01021ad6b4fdbb8d8ce0d331ff8e35983118f2da88e44e44f3776397d02619b80c3bfcba22595b07823e5587e40d3ce6eaefa2c966c4cb5beeeea3d5a
6
+ metadata.gz: e7da09d9ed75ff99abc047a08d9315f10a4af3a07d357439903404b9b8ebd304a7224ad8a5b67cf294204eca0014ee6cf42e98ee97db5c2687c80cb8b5661ac8
7
+ data.tar.gz: 02ac672d9b7f2a5c4b00eaa980d36ad017335a431e6b07147e45e1336ad75bd92bce80dc7b2dbaf8b7642f61406cba718cdb338be0aa4a3e47afa84917f7cd07
data/CHANGELOG.md CHANGED
@@ -1,10 +1,33 @@
1
1
  # Release History: opentelemetry-instrumentation-net_http
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
+
13
+ ### v0.17.0 / 2021-04-22
14
+
15
+ * FIXED: Refactor propagators to add #fields
16
+
17
+ ### v0.16.0 / 2021-03-17
18
+
19
+ * FIXED: Example scripts now reference local common lib
20
+ * DOCS: Replace Gitter with GitHub Discussions
21
+
22
+ ### v0.15.0 / 2021-02-18
23
+
24
+ * ADDED: Add Net::HTTP#connect tracing
25
+
3
26
  ### v0.14.0 / 2021-02-03
4
27
 
5
- * BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
28
+ * BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
6
29
 
7
- * ADDED: Replace getter and setter callables and remove rack specific propagators
30
+ * ADDED: Replace getter and setter callables and remove rack specific propagators
8
31
 
9
32
  ### v0.13.0 / 2021-01-29
10
33
 
@@ -16,7 +39,7 @@
16
39
 
17
40
  ### v0.11.0 / 2020-12-11
18
41
 
19
- * FIXED: Copyright comments to not reference year
42
+ * FIXED: Copyright comments to not reference year
20
43
 
21
44
  ### v0.10.0 / 2020-12-03
22
45
 
@@ -24,18 +47,18 @@
24
47
 
25
48
  ### v0.9.0 / 2020-11-27
26
49
 
27
- * ADDED: Add common helpers
50
+ * ADDED: Add common helpers
28
51
 
29
52
  ### v0.8.0 / 2020-10-27
30
53
 
31
- * BREAKING CHANGE: Remove 'canonical' from status codes
54
+ * BREAKING CHANGE: Remove 'canonical' from status codes
32
55
 
33
- * FIXED: Remove 'canonical' from status codes
56
+ * FIXED: Remove 'canonical' from status codes
34
57
 
35
58
  ### v0.7.0 / 2020-10-07
36
59
 
37
- * DOCS: Added documentation for net_http gem in instrumentation
38
- * DOCS: Standardize toplevel docs structure and readme
60
+ * DOCS: Added documentation for net_http gem in instrumentation
61
+ * DOCS: Standardize toplevel docs structure and readme
39
62
 
40
63
  ### v0.6.0 / 2020-09-10
41
64
 
data/README.md CHANGED
@@ -38,7 +38,7 @@ An example of usage can be seen in [`example/net_http.rb`](https://github.com/op
38
38
 
39
39
  The `opentelemetry-instrumentation-net_http` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
40
40
 
41
- The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us on our [gitter channel][ruby-gitter] 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].
41
+ 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].
42
42
 
43
43
  ## License
44
44
 
@@ -50,4 +50,4 @@ Apache 2.0 license. See [LICENSE][license-github] for more information.
50
50
  [license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/main/LICENSE
51
51
  [ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
52
52
  [community-meetings]: https://github.com/open-telemetry/community#community-meetings
53
- [ruby-gitter]: https://gitter.im/open-telemetry/opentelemetry-ruby
53
+ [discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
@@ -6,6 +6,7 @@
6
6
 
7
7
  require 'opentelemetry'
8
8
  require 'opentelemetry/common'
9
+ require 'opentelemetry-instrumentation-base'
9
10
 
10
11
  module OpenTelemetry
11
12
  module Instrumentation
@@ -40,15 +40,31 @@ module OpenTelemetry
40
40
 
41
41
  private
42
42
 
43
+ def connect
44
+ if proxy?
45
+ conn_address = proxy_address
46
+ conn_port = proxy_port
47
+ else
48
+ conn_address = address
49
+ conn_port = port
50
+ end
51
+
52
+ attributes = OpenTelemetry::Common::HTTP::ClientContext.attributes
53
+ tracer.in_span('HTTP CONNECT', attributes: attributes.merge(
54
+ 'peer.hostname' => conn_address,
55
+ 'peer.port' => conn_port
56
+ )) do
57
+ super
58
+ end
59
+ end
60
+
43
61
  def annotate_span_with_response!(span, response)
44
62
  return unless response&.code
45
63
 
46
64
  status_code = response.code.to_i
47
65
 
48
66
  span.set_attribute('http.status_code', status_code)
49
- span.status = OpenTelemetry::Trace::Status.http_to_status(
50
- status_code
51
- )
67
+ span.status = OpenTelemetry::Trace::Status.error unless (100..399).include?(status_code.to_i)
52
68
  end
53
69
 
54
70
  def tracer
@@ -8,7 +8,7 @@ module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Net
10
10
  module HTTP
11
- VERSION = '0.14.0'
11
+ VERSION = '0.19.0'
12
12
  end
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-net_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.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-02-03 00:00:00.000000000 Z
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,28 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.14.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.14.0
26
+ version: 1.0.0.rc2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: opentelemetry-common
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.14.0
33
+ version: 0.19.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.14.0
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
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +86,14 @@ dependencies:
72
86
  requirements:
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '0.0'
89
+ version: 1.0.0.rc1
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '0.0'
96
+ version: 1.0.0.rc1
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rake
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +142,14 @@ dependencies:
128
142
  requirements:
129
143
  - - "~>"
130
144
  - !ruby/object:Gem::Version
131
- version: 3.7.6
145
+ version: 3.11.0
132
146
  type: :development
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
150
  - - "~>"
137
151
  - !ruby/object:Gem::Version
138
- version: 3.7.6
152
+ version: 3.11.0
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: yard
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -185,10 +199,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
185
199
  licenses:
186
200
  - Apache-2.0
187
201
  metadata:
188
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-net_http/v0.14.0/file.CHANGELOG.html
202
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-net_http/v0.19.0/file.CHANGELOG.html
189
203
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/net_http
190
204
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
191
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-net_http/v0.14.0
205
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-net_http/v0.19.0
192
206
  post_install_message:
193
207
  rdoc_options: []
194
208
  require_paths:
@@ -204,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
218
  - !ruby/object:Gem::Version
205
219
  version: '0'
206
220
  requirements: []
207
- rubygems_version: 3.1.4
221
+ rubygems_version: 3.1.6
208
222
  signing_key:
209
223
  specification_version: 4
210
224
  summary: Net::HTTP instrumentation for the OpenTelemetry framework