opentelemetry-instrumentation-net_http 0.5.0 → 0.10.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: 67137ff6208d56cdf647750ce2980c52a0e2698d31bdd3ac03a1a86439430f1f
4
- data.tar.gz: 5c42580d2cd4ec8cc2db8a8b3c0b0ab0ee3ef2b046f718d5986109e44c454c60
3
+ metadata.gz: b969c8a89389492f28e9c1cba532b229ec218765f854e384603d34eb815dfb2a
4
+ data.tar.gz: 5fb496c0876e05999ec24fd9085da38cd37d568157494db341b9d3231794da8f
5
5
  SHA512:
6
- metadata.gz: 2d4f2de389cd6a84bb810e56912e45f9918c2f08a539b5c789b835a7c1275f368e5427d72c62890bc19895e790f6438d4bdb4321de1886d69a5eb01b03ec1f04
7
- data.tar.gz: f7780d8f1c87c3820947ca8850c9df9c525a6a2462bba8e46dd7b3987d76e59fd5b0ecfcab7a5ac717a8b255155cbbbc133786a08f86ab4259bc9b00b7c09d72
6
+ metadata.gz: 3663c8394eac3057eb55bbe6d3d6d0a9f4fd0435f3bc8c8dda44d94a9583afa27fe3f88bbad20d6c3a833f6e591b11775ffe37680e0509dacf42791f2783581e
7
+ data.tar.gz: c082f787060e96e2e3f73f6c14b6700c8330aa00e9919a996080c92e101c7669a885c90863633df944b59994292b8acee3eb26893891f4c97b91429ebbc23c3e
@@ -0,0 +1,9 @@
1
+ --no-private
2
+ --title=OpenTelemetry Net::HTTP Instrumentation
3
+ --markup=markdown
4
+ --main=README.md
5
+ ./lib/opentelemetry/instrumentation/**/*.rb
6
+ ./lib/opentelemetry/instrumentation.rb
7
+ -
8
+ README.md
9
+ CHANGELOG.md
@@ -0,0 +1,24 @@
1
+ # Release History: opentelemetry-instrumentation-net_http
2
+
3
+ ### v0.10.0 / 2020-12-03
4
+
5
+ * (No significant changes)
6
+
7
+ ### v0.9.0 / 2020-11-27
8
+
9
+ * ADDED: Add common helpers
10
+
11
+ ### v0.8.0 / 2020-10-27
12
+
13
+ * BREAKING CHANGE: Remove 'canonical' from status codes
14
+
15
+ * FIXED: Remove 'canonical' from status codes
16
+
17
+ ### v0.7.0 / 2020-10-07
18
+
19
+ * DOCS: Added documentation for net_http gem in instrumentation
20
+ * DOCS: Standardize toplevel docs structure and readme
21
+
22
+ ### v0.6.0 / 2020-09-10
23
+
24
+ * (No significant changes)
@@ -0,0 +1,53 @@
1
+ # OpenTelemetry Net::HTTP Instrumentation
2
+
3
+ The OpenTelemetry Net::HTTP Ruby gem is a community maintained instrumentation for [Net::HTTP][net-http-home].
4
+
5
+ ## How do I get started?
6
+
7
+ Install the gem using:
8
+
9
+ ```
10
+ gem install opentelemetry-instrumentation-net_http
11
+ ```
12
+
13
+ Or, if you use [bundler][bundler-home], include `opentelemetry-instrumentation-net_http` in your `Gemfile`.
14
+
15
+ ## Usage
16
+
17
+ To install the instrumentation, call `use` with the name of the instrumentation.
18
+
19
+ ```ruby
20
+ OpenTelemetry::SDK.configure do |c|
21
+ c.use 'OpenTelemetry::Instrumentation::Net::HTTP'
22
+ end
23
+ ```
24
+
25
+ Alternatively, you can also call `use_all` to install all the available instrumentation.
26
+
27
+ ```ruby
28
+ OpenTelemetry::SDK.configure do |c|
29
+ c.use_all
30
+ end
31
+ ```
32
+
33
+ ## Example
34
+
35
+ An example of usage can be seen in [`example/net_http.rb`](https://github.com/open-telemetry/opentelemetry-ruby/blob/master/instrumentation/net_http/example/net_http.rb).
36
+
37
+ ## How can I get involved?
38
+
39
+ The `opentelemetry-instrumentation-net_http` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
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].
42
+
43
+ ## License
44
+
45
+ Apache 2.0 license. See [LICENSE][license-github] for more information.
46
+
47
+ [net-http-home]: https://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html
48
+ [bundler-home]: https://bundler.io
49
+ [repo-github]: https://github.com/open-telemetry/opentelemetry-ruby
50
+ [license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/master/LICENSE
51
+ [ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
52
+ [community-meetings]: https://github.com/open-telemetry/community#community-meetings
53
+ [ruby-gitter]: https://gitter.im/open-telemetry/opentelemetry-ruby
@@ -4,6 +4,12 @@
4
4
  #
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
7
+ # OpenTelemetry is an open source observability framework, providing a
8
+ # general-purpose API, SDK, and related tools required for the instrumentation
9
+ # of cloud-native software, frameworks, and libraries.
10
+ #
11
+ # The OpenTelemetry module provides global accessors for telemetry objects.
12
+ # See the documentation for the `opentelemetry-api` gem for details.
7
13
  module OpenTelemetry
8
14
  # "Instrumentation" are specified by
9
15
  # https://github.com/open-telemetry/opentelemetry-specification/blob/784635d01d8690c8f5fcd1f55bdbc8a13cf2f4f2/specification/glossary.md#instrumentation-library
@@ -5,6 +5,7 @@
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
7
7
  require 'opentelemetry'
8
+ require 'opentelemetry/common'
8
9
 
9
10
  module OpenTelemetry
10
11
  module Instrumentation
@@ -18,15 +18,16 @@ module OpenTelemetry
18
18
  # Do not trace recursive call for starting the connection
19
19
  return super(req, body, &block) unless started?
20
20
 
21
+ attributes = OpenTelemetry::Common::HTTP::ClientContext.attributes
21
22
  tracer.in_span(
22
23
  HTTP_METHODS_TO_SPAN_NAMES[req.method],
23
- attributes: {
24
+ attributes: attributes.merge(
24
25
  'http.method' => req.method,
25
26
  'http.scheme' => USE_SSL_TO_SCHEME[use_ssl?],
26
27
  'http.target' => req.path,
27
28
  'peer.hostname' => @address,
28
29
  'peer.port' => @port
29
- },
30
+ ),
30
31
  kind: :client
31
32
  ) do |span|
32
33
  OpenTelemetry.propagation.http.inject(req)
@@ -8,7 +8,7 @@ module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Net
10
10
  module HTTP
11
- VERSION = '0.5.0'
11
+ VERSION = '0.10.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.5.0
4
+ version: 0.10.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: 2020-07-17 00:00:00.000000000 Z
11
+ date: 2020-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.5.0
19
+ version: 0.10.0
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.5.0
26
+ version: 0.10.0
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.10.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.10.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -157,7 +171,10 @@ executables: []
157
171
  extensions: []
158
172
  extra_rdoc_files: []
159
173
  files:
174
+ - ".yardopts"
175
+ - CHANGELOG.md
160
176
  - LICENSE
177
+ - README.md
161
178
  - lib/opentelemetry-instrumentation-net_http.rb
162
179
  - lib/opentelemetry/instrumentation.rb
163
180
  - lib/opentelemetry/instrumentation/net/http.rb
@@ -167,7 +184,11 @@ files:
167
184
  homepage: https://github.com/open-telemetry/opentelemetry-ruby
168
185
  licenses:
169
186
  - Apache-2.0
170
- metadata: {}
187
+ metadata:
188
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-net_http/v0.10.0/file.CHANGELOG.html
189
+ source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/master/instrumentation/net_http
190
+ 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.10.0
171
192
  post_install_message:
172
193
  rdoc_options: []
173
194
  require_paths:
@@ -183,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
204
  - !ruby/object:Gem::Version
184
205
  version: '0'
185
206
  requirements: []
186
- rubygems_version: 3.0.3
207
+ rubygems_version: 3.1.4
187
208
  signing_key:
188
209
  specification_version: 4
189
210
  summary: Net::HTTP instrumentation for the OpenTelemetry framework