Skip to content

Commit 392b763

Browse files
committed
bug: Sentry update changed current hub accessor
With Sentry updates we go braking changes in the Sentry hub API. The current hub is now accessible over the global Sentry.get_current_hub
1 parent b3e2e52 commit 392b763

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/runner/connection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def handle_timeout(_event)
271271
# and adapted to the Websocket protocol running with EventMachine.
272272

273273
def clone_sentry_hub_from_span(sentry_span)
274-
Thread.current.thread_variable_set(Sentry::THREAD_LOCAL, sentry_span.transaction.hub.clone) if sentry_span
274+
Thread.current.thread_variable_set(Sentry::THREAD_LOCAL, Sentry.get_current_hub.clone) if sentry_span
275275
end
276276

277277
def sentry_trace_header(sentry_span)
@@ -304,6 +304,6 @@ def record_sentry_breadcrumb(sentry_span, event)
304304
url: @socket.url,
305305
}
306306
)
307-
sentry_span.transaction.hub.add_breadcrumb(crumb)
307+
Sentry.get_current_hub.add_breadcrumb(crumb)
308308
end
309309
end

0 commit comments

Comments
 (0)