Skip to content

Commit db42db9

Browse files
author
Robert Looby
committed
Fix double counting of Faraday spans when using net_http_persistent adapter
1 parent d5dd432 commit db42db9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sentry-ruby/lib/sentry/faraday.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def initialize(url = nil, options = nil)
1414

1515
# Ensure that we attach instrumentation only if the adapter is not net/http
1616
# because if is is, then the net/http instrumentation will take care of it
17-
if builder.adapter.name != "Faraday::Adapter::NetHttp"
17+
if !builder.adapter.name.start_with?("Faraday::Adapter::NetHttp")
1818
# Make sure that it's going to be the first middleware so that it can capture
1919
# the entire request processing involving other middlewares
2020
builder.insert(0, ::Faraday::Request::Instrumentation, name: OP_NAME, instrumenter: Instrumenter.new)

0 commit comments

Comments
 (0)