opentelemetry-instrumentation-rack 0.18.0 → 0.19.3

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: 045d523393ba587000900fa6fe04d53639bbc893745795ae71b95a8e295fa33f
4
- data.tar.gz: c56bdb588db187f92fc59038b6a7f612d9e38fe17a2d9544f3c04e9cc2a78551
3
+ metadata.gz: 84f8534ada7c9bcadbd3b67d895ac3735ae76e76816a3fb9d170b8bc806d2610
4
+ data.tar.gz: a02745f74e4483eab099d93ad1bf12d051530da2ddc06e8fe26cae2ec23c8d62
5
5
  SHA512:
6
- metadata.gz: 235196039e3f220a14563489952c810d2acface20997498213a8bb57573307c9a4cf1cbce1cb38da22e3073f56ec53838f9c1bf2eae053428779f6e2274345e3
7
- data.tar.gz: 66431cf36f90e5ed006d2a12cd396be2d30249562372cbc5bfdf5b97748f61afba051e765f99505474d7d074abcf117df84b9d7ec5cd9aa6fad143fbdd1ac46a
6
+ metadata.gz: 29a49222b833daf6e04625882aba90e4f343cccb7a1328b1e7e84e8c613ad4fe1d7db84b3053cf322ac71e9b15285d07e9a980a653fe966150f4fc6b74df14da
7
+ data.tar.gz: 92f2cd31fb3a6933b4f2c4bdc523dc99863a9bd01677b1b6280d089e4a3aac1f6d4138a0fe50294a5953be55cab0e52b16452fb38b2d9016ff51391b374939f7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Release History: opentelemetry-instrumentation-rack
2
2
 
3
+ ### v0.19.3 / 2021-09-29
4
+
5
+ * (No significant changes)
6
+
7
+ ### v0.19.2 / 2021-08-18
8
+
9
+ * FIXED: Rack middleware assuming script_name presence
10
+
11
+ ### v0.19.1 / 2021-08-12
12
+
13
+ * DOCS: Update docs to rely more on environment variable configuration
14
+
15
+ ### v0.19.0 / 2021-06-23
16
+
17
+ * BREAKING CHANGE: Total order constraint on span.status=
18
+
19
+ * ADDED: Add Tracer.non_recording_span to API
20
+ * FIXED: Total order constraint on span.status=
21
+
3
22
  ### v0.18.0 / 2021-05-21
4
23
 
5
24
  * ADDED: Updated API depedency for 1.0.0.rc1
@@ -121,18 +121,11 @@ module OpenTelemetry
121
121
  'http.method' => env['REQUEST_METHOD'],
122
122
  'http.host' => env['HTTP_HOST'] || 'unknown',
123
123
  'http.scheme' => env['rack.url_scheme'],
124
- 'http.target' => fullpath(env)
124
+ 'http.target' => env['QUERY_STRING'].empty? ? env['PATH_INFO'] : "#{env['PATH_INFO']}?#{env['QUERY_STRING']}"
125
125
  }
126
- attributes['http.user_agent'] = env['HTTP_USER_AGENT'] if env['HTTP_USER_AGENT']
127
- attributes.merge(allowed_request_headers(env))
128
- end
129
126
 
130
- # e.g., "/webshop/articles/4?s=1":
131
- def fullpath(env)
132
- query_string = env['QUERY_STRING']
133
- path = env['SCRIPT_NAME'] + env['PATH_INFO']
134
-
135
- query_string.empty? ? path : "#{path}?#{query_string}"
127
+ attributes['http.user_agent'] = env['HTTP_USER_AGENT'] if env['HTTP_USER_AGENT']
128
+ attributes.merge!(allowed_request_headers(env))
136
129
  end
137
130
 
138
131
  # https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-http.md#name
@@ -153,7 +146,7 @@ module OpenTelemetry
153
146
  end
154
147
 
155
148
  def set_attributes_after_request(span, status, headers, _response)
156
- span.status = OpenTelemetry::Trace::Status.http_to_status(status)
149
+ span.status = OpenTelemetry::Trace::Status.error unless (100..399).include?(status.to_i)
157
150
  span.set_attribute('http.status_code', status)
158
151
 
159
152
  # 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.18.0'
10
+ VERSION = '0.19.3'
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.18.0
4
+ version: 0.19.3
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-05-21 00:00:00.000000000 Z
11
+ date: 2021-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0.rc1
19
+ version: '1.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: 1.0.0.rc1
26
+ version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: opentelemetry-instrumentation-base
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.18.0
33
+ version: 0.18.3
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.18.0
40
+ version: 0.18.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: appraisal
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.0.0.rc1
89
+ version: '1.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.0.0.rc1
96
+ version: '1.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rack
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -228,10 +228,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
228
228
  licenses:
229
229
  - Apache-2.0
230
230
  metadata:
231
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-rack/v0.18.0/file.CHANGELOG.html
231
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-rack/v0.19.3/file.CHANGELOG.html
232
232
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/rack
233
233
  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.18.0
234
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-rack/v0.19.3
235
235
  post_install_message:
236
236
  rdoc_options: []
237
237
  require_paths: