opentelemetry-instrumentation-rack 0.20.0 → 0.21.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: 121351162db33511943ee22400ad05edc8bdf6efa74e6673c3f46f6c22040350
4
- data.tar.gz: 35d5abe73ec1ae9478edf28f51b21fafc922626ba830d4648b5ab38adce1fe03
3
+ metadata.gz: 78d05a138b397d0d31dd63cb7cf153ba441636a5954814e0174c6bbd48d7e81f
4
+ data.tar.gz: 5db210af2bc4c76f0cae594d4eb1b5e943729aac2929e27e9156f5a323c52917
5
5
  SHA512:
6
- metadata.gz: a52efd93f27f9f5fb8e269fef96c80180d6dec99280877f22da48314403eebfac0c18b9c15058fe2a999d4b7b34c8cfbfa70fe4af1bc348d93c01223a3336c88
7
- data.tar.gz: 5aa90c81f24ae2f8a2608b6556663488fc6394c716bf7f0bd4cda8ecc3da6abf8d5a54d050290445c8c118c803b57da0332806b9b07d5448c2118dabe72e4ad8
6
+ metadata.gz: b978ef942d1b47a623fbccd032d034d5fbe9995d4796fe8abd75eb6f3a10a12dd6853a260e7c420b7d6260ab972d1b1cfd0cf5d20635021cceb053a8cd173db4
7
+ data.tar.gz: 31ba609152a353b5f5dd2807aacdf0809657ea9b993fc895629cdc932fc9dbb88e77b1a0e07fb9ddeb4a810448965186f540765df048855e2ab5356072d73996
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Release History: opentelemetry-instrumentation-rack
2
2
 
3
+ ### v0.21.0 / 2022-06-09
4
+
5
+ * Upgrading Base dependency version
6
+ * FIXED: Broken test file requirements
7
+
8
+ ### v0.20.2 / 2022-05-02
9
+
10
+ * FIXED: Update server instrumentation to not reflect 400 status as error
11
+
12
+ ### v0.20.1 / 2021-12-01
13
+
14
+ * FIXED: [Instruentation Rack] Log content type http header
15
+ * FIXED: Use monotonic clock where possible
16
+ * FIXED: Rack to stop using api env getter
17
+
3
18
  ### v0.20.0 / 2021-10-06
4
19
 
5
20
  * FIXED: Prevent high cardinality rack span name as a default [#973](https://github.com/open-telemetry/opentelemetry-ruby/pull/973)
@@ -18,7 +18,13 @@ module OpenTelemetry
18
18
  class << self
19
19
  def allowed_rack_request_headers
20
20
  @allowed_rack_request_headers ||= Array(config[:allowed_request_headers]).each_with_object({}) do |header, memo|
21
- memo["HTTP_#{header.to_s.upcase.gsub(/[-\s]/, '_')}"] = build_attribute_name('http.request.headers.', header)
21
+ key = header.to_s.upcase.gsub(/[-\s]/, '_')
22
+ case key
23
+ when 'CONTENT_TYPE', 'CONTENT_LENGTH'
24
+ memo[key] = build_attribute_name('http.request.headers.', header)
25
+ else
26
+ memo["HTTP_#{key}"] = build_attribute_name('http.request.headers.', header)
27
+ end
22
28
  end
23
29
  end
24
30
 
@@ -62,7 +68,7 @@ module OpenTelemetry
62
68
  original_env = env.dup
63
69
  extracted_context = OpenTelemetry.propagation.extract(
64
70
  env,
65
- getter: OpenTelemetry::Context::Propagation.rack_env_getter
71
+ getter: OpenTelemetry::Common::Propagation.rack_env_getter
66
72
  )
67
73
  frontend_context = create_frontend_span(env, extracted_context)
68
74
 
@@ -101,9 +107,7 @@ module OpenTelemetry
101
107
 
102
108
  span = tracer.start_span('http_server.proxy',
103
109
  with_parent: extracted_context,
104
- attributes: {
105
- 'start_time' => request_start_time.to_f
106
- },
110
+ start_timestamp: request_start_time,
107
111
  kind: :server)
108
112
 
109
113
  OpenTelemetry::Trace.context_with_span(span, parent_context: extracted_context)
@@ -147,7 +151,7 @@ module OpenTelemetry
147
151
  end
148
152
 
149
153
  def set_attributes_after_request(span, status, headers, _response)
150
- span.status = OpenTelemetry::Trace::Status.error unless (100..399).include?(status.to_i)
154
+ span.status = OpenTelemetry::Trace::Status.error unless (100..499).include?(status.to_i)
151
155
  span.set_attribute('http.status_code', status)
152
156
 
153
157
  # NOTE: if data is available, it would be good to do this:
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Rack
10
- VERSION = '0.20.0'
10
+ VERSION = '0.21.0'
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-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.21.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-10-07 00:00:00.000000000 Z
11
+ date: 2022-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -24,20 +24,34 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.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.19.3
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.3
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: opentelemetry-instrumentation-base
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: 0.18.3
47
+ version: 0.21.0
34
48
  type: :runtime
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
52
  - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: 0.18.3
54
+ version: 0.21.0
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: appraisal
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +100,28 @@ dependencies:
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '1.0'
103
+ version: '1.1'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '1.0'
110
+ version: '1.1'
111
+ - !ruby/object:Gem::Dependency
112
+ name: opentelemetry-test-helpers
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
97
125
  - !ruby/object:Gem::Dependency
98
126
  name: rack
99
127
  requirement: !ruby/object:Gem::Requirement
@@ -228,10 +256,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
228
256
  licenses:
229
257
  - Apache-2.0
230
258
  metadata:
231
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-rack/v0.20.0/file.CHANGELOG.html
259
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-rack/v0.21.0/file.CHANGELOG.html
232
260
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/rack
233
261
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
234
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-rack/v0.20.0
262
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-rack/v0.21.0
235
263
  post_install_message:
236
264
  rdoc_options: []
237
265
  require_paths:
@@ -240,7 +268,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
268
  requirements:
241
269
  - - ">="
242
270
  - !ruby/object:Gem::Version
243
- version: 2.5.0
271
+ version: 2.6.0
244
272
  required_rubygems_version: !ruby/object:Gem::Requirement
245
273
  requirements:
246
274
  - - ">="