opentelemetry-instrumentation-faraday 0.24.7 → 0.24.8

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: 20a6c27bd32e03816e148c6050bd99b8d74afadb2f124bb10803713a64da2898
4
- data.tar.gz: 4e3527bd8c32cefdf46884a33d890d8adaa1924e393debecc36b373d745cc01f
3
+ metadata.gz: 6d77c32dd025abec6065c2178b3bb4f5b8b1e30f8346c144c90a69f842fe0e94
4
+ data.tar.gz: d2b7de74cb08ba24ea51979f8766b357255ce9154d71cb9fcf4cbc28d074bd06
5
5
  SHA512:
6
- metadata.gz: 76751c9103de72eb650e63304db6f65ea671ad01f13e9e0d82274409567ed6590563dbaab3ef472e538ca79cc44885aceb0f8358e85a5eaca00fb0df10206aee
7
- data.tar.gz: a44df86fd9da95d6e34f441d901fa9a8e33165f33af528eacd9a1627f19b3c648383edae731fa2a4b0e860e56d49d04934dd814f947d52797ca418c34bee073f
6
+ metadata.gz: affd8957e6074906a6471b0341d66e5f0df2e7b646994ed4940939270509a41cc1287faa0171d0c00b95aa0c3908c574ce9d28b27ab16c124458d3ff78c037e2
7
+ data.tar.gz: d3cfa506f11913c13bc71ca202f124821399ac2066993d69b06a052a176a8475ac708f968449e4b42dfe59a7679f5796f68c752f268a7d9b33d99dca28f3c700
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-faraday
2
2
 
3
+ ### v0.24.8 / 2024-12-17
4
+
5
+ * FIXED: Share Faraday Attrs with Adapter Spans
6
+
3
7
  ### v0.24.7 / 2024-11-26
4
8
 
5
9
  * CHANGED: Performance Freeze all range objects #1222
@@ -33,31 +33,34 @@ module OpenTelemetry
33
33
  attributes = span_creation_attributes(
34
34
  http_method: http_method, url: env.url, config: config
35
35
  )
36
- tracer.in_span(
37
- "HTTP #{http_method}", attributes: attributes, kind: config.fetch(:span_kind)
38
- ) do |span|
39
- OpenTelemetry.propagation.inject(env.request_headers)
40
36
 
41
- app.call(env).on_complete { |resp| trace_response(span, resp.status) }
42
- rescue ::Faraday::Error => e
43
- trace_response(span, e.response[:status]) if e.response
37
+ OpenTelemetry::Common::HTTP::ClientContext.with_attributes(attributes) do |attrs, _|
38
+ tracer.in_span(
39
+ "HTTP #{http_method}", attributes: attrs, kind: config.fetch(:span_kind)
40
+ ) do |span|
41
+ OpenTelemetry.propagation.inject(env.request_headers)
44
42
 
45
- raise
43
+ app.call(env).on_complete { |resp| trace_response(span, resp.status) }
44
+ rescue ::Faraday::Error => e
45
+ trace_response(span, e.response[:status]) if e.response
46
+
47
+ raise
48
+ end
46
49
  end
47
50
  end
48
51
 
49
52
  private
50
53
 
51
54
  def span_creation_attributes(http_method:, url:, config:)
52
- instrumentation_attrs = {
55
+ attrs = {
53
56
  'http.method' => http_method,
54
57
  'http.url' => OpenTelemetry::Common::Utilities.cleanse_url(url.to_s),
55
58
  'faraday.adapter.name' => app.class.name
56
59
  }
57
- instrumentation_attrs['net.peer.name'] = url.host if url.host
58
- instrumentation_attrs['peer.service'] = config[:peer_service] if config[:peer_service]
60
+ attrs['net.peer.name'] = url.host if url.host
61
+ attrs['peer.service'] = config[:peer_service] if config[:peer_service]
59
62
 
60
- instrumentation_attrs.merge!(
63
+ attrs.merge!(
61
64
  OpenTelemetry::Common::HTTP::ClientContext.attributes
62
65
  )
63
66
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Faraday
10
- VERSION = '0.24.7'
10
+ VERSION = '0.24.8'
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.7
4
+ version: 0.24.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-27 00:00:00.000000000 Z
11
+ date: 2024-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.68.0
117
+ version: 1.69.1
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.68.0
124
+ version: 1.69.1
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rubocop-performance
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -201,11 +201,11 @@ 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-faraday/0.24.7/file/CHANGELOG.md
204
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-faraday/0.24.8/file/CHANGELOG.md
205
205
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/faraday
206
206
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
207
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-faraday/0.24.7
208
- post_install_message:
207
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-faraday/0.24.8
208
+ post_install_message:
209
209
  rdoc_options: []
210
210
  require_paths:
211
211
  - lib
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  version: '0'
222
222
  requirements: []
223
223
  rubygems_version: 3.2.33
224
- signing_key:
224
+ signing_key:
225
225
  specification_version: 4
226
226
  summary: Faraday instrumentation for the OpenTelemetry framework
227
227
  test_files: []