You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The customer is trying to set performance metrics in a React Native app as described in the Sentry documentation on performance metrics. However, when using Sentry React Native v6.5.0, the snippet below fails with an error:
import * as Sentry from "@sentry/react-native";
const transaction = Sentry.getCurrentScope().getTransaction();
// Record amount of memory used
transaction.setMeasurement("memoryUsed", 123, "byte");
TypeError: Sentry.getCurrentScope().getTransaction is not a function (it is undefined)
Expected Result
I expect Sentry.getCurrentScope() to return a scope object with getTransaction(), per the documentation.
Actual Result
The customer gets an error that getTransaction() is undefined, and cannot record the measurement.
The text was updated successfully, but these errors were encountered:
What React Native libraries do you use?
Hermes
Are you using sentry.io or on-premise?
sentry.io (SaS)
@sentry/react-native SDK Version
6.5.0
How does your development environment look like?
Sentry.init()
Steps to Reproduce
The customer is trying to set performance metrics in a React Native app as described in the Sentry documentation on performance metrics. However, when using Sentry React Native v6.5.0, the snippet below fails with an error:
TypeError: Sentry.getCurrentScope().getTransaction is not a function (it is undefined)
Expected Result
I expect Sentry.getCurrentScope() to return a scope object with getTransaction(), per the documentation.
Actual Result
The customer gets an error that getTransaction() is undefined, and cannot record the measurement.
The text was updated successfully, but these errors were encountered: