runWithCblSentrySpan<T> function

T runWithCblSentrySpan<T>(
  1. ISentrySpan span,
  2. T fn()
)

Runs a function in a zone in which the given span is the current cblSentrySpan.

This function will be removed once Sentry has support for zones.

Implementation

T runWithCblSentrySpan<T>(ISentrySpan span, T Function() fn) =>
    runZoned(fn, zoneValues: {#_sentrySpan: span});