opentelemetry-instrumentation-faraday 0.24.0 → 0.24.1

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: 30092c22c909e755e36b113d354e21781222fe1b93e1a41640dc1764a5bb4edd
4
- data.tar.gz: f33f7d607f8590cd320fe19dec748317b656214770379071a116e24084dad5c0
3
+ metadata.gz: 15923320510f923bdbefc0418d6e6de804a99280bb636cbb9b7877c4f43e93cb
4
+ data.tar.gz: b743cbca0b24b41a9570b1c0004308f3b4a6468ef3df914520605d1562794e82
5
5
  SHA512:
6
- metadata.gz: 5f1b7344eb1522a38aff5c07315742d42b57c16b76d1f2525e8ec5db8b4181cbad7a0fa29c4d83dc0ef82f7052eaf4c11170d42b1738b68e4766208b0247b193
7
- data.tar.gz: 61286db2222c234660741d7f10842384e8d5074a479068731e4c95d831ac05950a74cb334f252ac06cd70b70460bc632d297173e30981323a73aa1a56f137384
6
+ metadata.gz: d6f105c1c18aa9d054e954d5de52eb9f52c350165ea1da5140cfb95d1ecc8f4524f4b0b1547994699416744a9fabdb65ee2d923d8011ad14be0ea4803a2a5320
7
+ data.tar.gz: 4b8902dfbc24d5c8c61839f13ffe129ea0b6a286377a5c603fcc8a94ac9fc2adcba58e69ed4277661b89c92c4ab0ce3dda3c775d42a0d96467352c2e5256607e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-faraday
2
2
 
3
+ ### v0.24.1 / 2024-03-22
4
+
5
+ * FIXED: Propagate response attributes on Faraday::Error.
6
+
3
7
  ### v0.24.0 / 2024-02-20
4
8
 
5
9
  * ADDED: Faraday add support for internal spans
@@ -35,7 +35,11 @@ module OpenTelemetry
35
35
  ) do |span|
36
36
  OpenTelemetry.propagation.inject(env.request_headers)
37
37
 
38
- app.call(env).on_complete { |resp| trace_response(span, resp) }
38
+ app.call(env).on_complete { |resp| trace_response(span, resp.status) }
39
+ rescue ::Faraday::Error => e
40
+ trace_response(span, e.response[:status]) if e.response
41
+
42
+ raise
39
43
  end
40
44
  end
41
45
 
@@ -62,9 +66,9 @@ module OpenTelemetry
62
66
  Faraday::Instrumentation.instance.tracer
63
67
  end
64
68
 
65
- def trace_response(span, response)
66
- span.set_attribute('http.status_code', response.status)
67
- span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(response.status.to_i)
69
+ def trace_response(span, status)
70
+ span.set_attribute('http.status_code', status)
71
+ span.status = OpenTelemetry::Trace::Status.error unless (100..399).cover?(status.to_i)
68
72
  end
69
73
  end
70
74
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Faraday
10
- VERSION = '0.24.0'
10
+ VERSION = '0.24.1'
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-faraday
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.24.1
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-02-20 00:00:00.000000000 Z
11
+ date: 2024-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -228,10 +228,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
228
228
  licenses:
229
229
  - Apache-2.0
230
230
  metadata:
231
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-faraday/0.24.0/file/CHANGELOG.md
231
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-faraday/0.24.1/file/CHANGELOG.md
232
232
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/faraday
233
233
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
234
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-faraday/0.24.0
234
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-faraday/0.24.1
235
235
  post_install_message:
236
236
  rdoc_options: []
237
237
  require_paths: