We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef0ff93 commit 6863c2eCopy full SHA for 6863c2e
1 file changed
src/Sentry/HubExtensions.cs
@@ -242,9 +242,14 @@ internal static ITransactionTracer StartTransaction(
242
_ => hub.StartTransaction(context, customSamplingContext)
243
};
244
245
- internal static ITransactionTracer? GetTransaction(this IHub hub)
+ internal static ITransactionTracer ? GetTransaction(this IHub hub)
246
{
247
- ITransactionTracer? transaction = null;
+ if (hub is Hub fullHub)
248
+ {
249
+ return fullHub.ScopeManager.GetCurrent().Key.Transaction;
250
+ }
251
+
252
+ ITransactionTracer ? transaction = null;
253
hub.ConfigureScope(scope => transaction = scope.Transaction);
254
return transaction;
255
}
0 commit comments