opentelemetry-instrumentation-excon 0.22.3 → 0.22.5

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: c98c527b10d615a2019b7ba1cccf4c896f90ea2131ddb63be8a91808ddbcff81
4
- data.tar.gz: 831d8b942ce39bbd3bdb520b0c9102a8d88ce52f5a6dd31e7c35f5d6404d0cd5
3
+ metadata.gz: c0fd87044ff607b499f512e7949e070edf4f830c304453898b6a07b9a7306cf5
4
+ data.tar.gz: 54e0c70caa824e583d3fb5d4980a5ed7644a16563ff364b389e6bb07a1812309
5
5
  SHA512:
6
- metadata.gz: ffd7f30254f60baf6bf5afd8985a3cec167bb3d0f878fe1ac4b1b511d4306a56c73a018a73ca1888bc36465e8b2545899615dc8f3969930c20e91bc563738f8f
7
- data.tar.gz: b8016f6e2691a175e2e7d3c48342f40b5654fd1a539ecf5c872dbccc22300e445bcfae8b4dd9c10b5d6684f1025e1f851b7332225bcd2de610ffbaca990c15a3
6
+ metadata.gz: 7cc37ae4f7b456a68bea659ea6bd7c1d110820044b3c80d3a3d345cd7428ca3057906993ccee86811e4825bce660e5c167e4da0d476e52c450067183fbde019c
7
+ data.tar.gz: 54c1612567863af0fff22f33afb323164bde465f14548d7ca0831fb907def1ecfbc2b34030fa17ec18e8651d79d5677e0280b4a038c5d09eff49e008cc780895
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release History: opentelemetry-instrumentation-excon
2
2
 
3
+ ### v0.22.5 / 2024-11-26
4
+
5
+ * CHANGED: Performance Freeze all range objects #1222
6
+
7
+ ### v0.22.4 / 2024-07-23
8
+
9
+ * DOCS: Add cspell to CI
10
+
3
11
  ### v0.22.3 / 2024-06-18
4
12
 
5
13
  * FIXED: Relax otel common gem constraints
@@ -75,7 +83,7 @@
75
83
 
76
84
  ### v0.18.0 / 2021-05-21
77
85
 
78
- * ADDED: Updated API depedency for 1.0.0.rc1
86
+ * ADDED: Updated API dependency for 1.0.0.rc1
79
87
  * FIXED: Removed http.status_text attribute #750
80
88
 
81
89
  ### v0.17.0 / 2021-04-22
@@ -130,7 +138,7 @@
130
138
 
131
139
  ### v0.7.0 / 2020-10-07
132
140
 
133
- * DOCS: Standardize toplevel docs structure and readme
141
+ * DOCS: Standardize top-level docs structure and readme
134
142
 
135
143
  ### v0.6.0 / 2020-09-10
136
144
 
data/README.md CHANGED
@@ -6,7 +6,7 @@ The excon instrumentation is a community-maintained instrumentation for the [exc
6
6
 
7
7
  Install the gem using:
8
8
 
9
- ```
9
+ ```console
10
10
  gem install opentelemetry-instrumentation-excon
11
11
  ```
12
12
 
@@ -16,7 +16,6 @@ Or, if you use [bundler][bundler-home], include `opentelemetry-instrumentation-e
16
16
 
17
17
  To install the instrumentation, call `use` with the name of the instrumentation.
18
18
 
19
-
20
19
  ```ruby
21
20
  OpenTelemetry::SDK.configure do |c|
22
21
  c.use 'OpenTelemetry::Instrumentation::Excon'
@@ -35,7 +34,7 @@ end
35
34
 
36
35
  The `opentelemetry-instrumentation-excon` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
37
36
 
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].
37
+ The OpenTelemetry Ruby gems are maintained by the OpenTelemetry Ruby special interest group (SIG). You can get involved by joining us on our [GitHub Discussions][discussions-url], [Slack Channel][slack-channel] 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
38
 
40
39
  ## License
41
40
 
@@ -47,4 +46,5 @@ The `opentelemetry-instrumentation-all` gem is distributed under the Apache 2.0
47
46
  [license-github]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/LICENSE
48
47
  [ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
49
48
  [community-meetings]: https://github.com/open-telemetry/community#community-meetings
49
+ [slack-channel]: https://cloud-native.slack.com/archives/C01NWKKMKMY
50
50
  [discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
@@ -21,11 +21,13 @@ module OpenTelemetry
21
21
  hash[uppercase_method] ||= "HTTP #{uppercase_method}"
22
22
  end.freeze
23
23
 
24
+ # Constant for the HTTP status range
25
+ HTTP_STATUS_SUCCESS_RANGE = (100..399)
26
+
24
27
  def request_call(datum)
25
28
  return @stack.request_call(datum) if untraced?(datum)
26
29
 
27
30
  http_method = HTTP_METHODS_TO_UPPERCASE[datum[:method]]
28
-
29
31
  attributes = {
30
32
  OpenTelemetry::SemanticConventions::Trace::HTTP_HOST => datum[:host],
31
33
  OpenTelemetry::SemanticConventions::Trace::HTTP_METHOD => http_method,
@@ -35,19 +37,14 @@ module OpenTelemetry
35
37
  OpenTelemetry::SemanticConventions::Trace::NET_PEER_NAME => datum[:hostname],
36
38
  OpenTelemetry::SemanticConventions::Trace::NET_PEER_PORT => datum[:port]
37
39
  }
38
-
39
40
  peer_service = Excon::Instrumentation.instance.config[:peer_service]
40
41
  attributes[OpenTelemetry::SemanticConventions::Trace::PEER_SERVICE] = peer_service if peer_service
41
42
  attributes.merge!(OpenTelemetry::Common::HTTP::ClientContext.attributes)
42
-
43
43
  span = tracer.start_span(HTTP_METHODS_TO_SPAN_NAMES[http_method], attributes: attributes, kind: :client)
44
44
  ctx = OpenTelemetry::Trace.context_with_span(span)
45
-
46
45
  datum[:otel_span] = span
47
46
  datum[:otel_token] = OpenTelemetry::Context.attach(ctx)
48
-
49
47
  OpenTelemetry.propagation.inject(datum[:headers])
50
-
51
48
  @stack.request_call(datum)
52
49
  end
53
50
 
@@ -68,7 +65,6 @@ module OpenTelemetry
68
65
  # If the default stack contains a version of the trace middleware already...
69
66
  existing_trace_middleware = default_stack.find { |m| m <= TracerMiddleware }
70
67
  default_stack.delete(existing_trace_middleware) if existing_trace_middleware
71
-
72
68
  # Inject after the ResponseParser middleware
73
69
  response_middleware_index = default_stack.index(::Excon::Middleware::ResponseParser).to_i
74
70
  default_stack.insert(response_middleware_index + 1, self)
@@ -84,7 +80,7 @@ module OpenTelemetry
84
80
  if datum.key?(:response)
85
81
  response = datum[:response]
86
82
  span.set_attribute(OpenTelemetry::SemanticConventions::Trace::HTTP_STATUS_CODE, response[:status])
87
- span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(response[:status].to_i)
83
+ span.status = OpenTelemetry::Trace::Status.error unless HTTP_STATUS_SUCCESS_RANGE.cover?(response[:status].to_i)
88
84
  end
89
85
 
90
86
  if datum.key?(:error)
@@ -93,7 +89,6 @@ module OpenTelemetry
93
89
  end
94
90
 
95
91
  span.finish
96
-
97
92
  OpenTelemetry::Context.detach(datum.delete(:otel_token)) if datum.include?(:otel_token)
98
93
  end
99
94
  rescue StandardError => e
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Excon
10
- VERSION = '0.22.3'
10
+ VERSION = '0.22.5'
11
11
  end
12
12
  end
13
13
  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.22.3
4
+ version: 0.22.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-18 00:00:00.000000000 Z
11
+ date: 2024-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -114,28 +114,28 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.64.0
117
+ version: 1.68.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.64.0
124
+ version: 1.68.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rubocop-performance
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '1.20'
131
+ version: 1.23.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '1.20'
138
+ version: 1.23.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: simplecov
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '3.19'
159
+ version: 3.24.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '3.19'
166
+ version: 3.24.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: yard
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -201,10 +201,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
201
201
  licenses:
202
202
  - Apache-2.0
203
203
  metadata:
204
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-excon/0.22.3/file/CHANGELOG.md
204
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-excon/0.22.5/file/CHANGELOG.md
205
205
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/excon
206
206
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
207
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-excon/0.22.3
207
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-excon/0.22.5
208
208
  post_install_message:
209
209
  rdoc_options: []
210
210
  require_paths: