codemod
codemod copied to clipboard
[codemod request] sentry.configureScope : Removal of Sentry.configureScope method
Removal of Sentry.configureScope
In Sentry JavaScript SDK 7.x to 8.x, this codemod removes top level Sentry.configureScope function. Instead, uses the Sentry.getCurrentScope() to access and mutate the current scope.
Examples
Code before transformation
Sentry.configureScope((scope) => {
scope.setTag("key", "value");
});
Code after transformation
Sentry.getCurrentScope().setTag("key", "value");
Applicability Criteria
Sentry JavaScript SDK 7.x -> 8.x