lib/httpx/adapters/sentry.rb in httpx-0.22.4 vs lib/httpx/adapters/sentry.rb in httpx-0.22.5
- old
+ new
@@ -87,12 +87,22 @@
result
end
end
+ module RequestMethods
+ def __sentry_enable_trace!
+ return super if @__sentry_enable_trace
+
+ Tracer.call(self)
+ @__sentry_enable_trace = true
+ end
+ end
+
module ConnectionMethods
def send(request)
- Tracer.call(request)
+ request.__sentry_enable_trace!
+
super
end
end
end
end