Sentry-Expo不会上传性能监视
我想从Sentry文档实现自动仪器,但没有上传。 https:// https:// https://docs.sentry.io/platry.io/platforms/reeact/reactforms/reeact - 本地/性能/仪器/自动启动/ 我只检查iOS。 React-Native应用程序使用裸露的工作流进行博览会。我使用Sentry的团队计划。这是一个裸露的工作流程,因此需要与文档设置不同?我已经确认我正在运行react-native link @sentry/react-native
。 https://docs.expo.dev/guides/guides/guides/using-sentry/
- expo之间
-
-
-
-
-
- 。
// App.tsx
import * as Sentry from "sentry-expo";
import { routingInstrumentation } from "./RootNavigator";
Sentry.init({
dsn: SENTRY_DNS,
enableInExpoDevelopment: true,
debug: true,
environment: isDevProject ? "development" : "production",
integrations: [
new Sentry.Native.ReactNativeTracing({
routingInstrumentation
})
]
});
const App = () => {
...
export default Sentry.Native.wrap(App);
// RootNavigator.tsx
export const routingInstrumentation =
new Sentry.Native.ReactNavigationInstrumentation();
export const RootNavigator = () => {
const navigation = useRef();
return (
<NavigationContainer
ref={navigation}
onReady={() => {
routingInstrumentation.registerNavigationContainer(navigation);
}}
>
<RootStack />
</NavigationContainer>
);
};
LOG Sentry Logger [log]: Integration installed: Release
LOG Sentry Logger [log]: Integration installed: InboundFilters
LOG Sentry Logger [log]: Integration installed: FunctionToString
LOG Sentry Logger [log]: Integration installed: Breadcrumbs
LOG Sentry Logger [log]: Integration installed: LinkedErrors
LOG Sentry Logger [log]: Integration installed: Dedupe
LOG Sentry Logger [log]: Integration installed: UserAgent
LOG Sentry Logger [log]: Integration installed: EventOrigin
LOG Sentry Logger [log]: Integration installed: SdkInfo
LOG Sentry Logger [log]: Integration installed: DebugSymbolicator
LOG Sentry Logger [log]: Integration installed: DeviceContext
LOG Sentry Logger [log]: Unhandled promise rejections will be caught by Sentry.
LOG Sentry Logger [log]: Integration installed: ReactNativeErrorHandlers
LOG Sentry Logger [log]: Integration installed: ExpoBareIntegration
LOG Sentry Logger [log]: Integration installed: RewriteFrames
LOG Sentry Logger [log]: [ReactNativeTracing] Native frames instrumentation initialized.
LOG Sentry Logger [log]: Setting idle transaction on scope. Span ID: b83d8034e147174f
LOG Sentry Logger [log]: [ReactNativeTracing] Starting navigation transaction "Route Change" on scope
LOG Sentry Logger [log]: Integration installed: ReactNativeTracing
LOG Sentry Logger [log]: [Tracing] No active IdleTransaction
LOG Sentry Logger [log]: [Tracing] Discarding transaction because its trace was not chosen to be sampled.
LOG Sentry Logger [log]: [Tracing] No active IdleTransaction
WARN Constants.installationId has been deprecated in favor of generating and storing your own ID. Implement it using expo-application's androidId on Android and a storage API such as expo-secure-store on iOS and localStorage on the web. This API will be removed in SDK 44.
LOG Sentry Logger [log]: [ReactNavigationInstrumentation] Navigation container registered, but integration has not been setup yet.
LOG Sentry Logger [log]: Setting idle transaction on scope. Span ID: 9b853cb1f7205d52
LOG Sentry Logger [log]: [ReactNativeTracing] Starting navigation transaction "Route Change" on scope
LOG Sentry Logger [log]: [ReactNavigationInstrumentation] Will not send transaction "HomeScreen" due to beforeNavigate.
LOG Sentry Logger [log]: Setting idle transaction on scope. Span ID: 8ff341d5619f89aa
LOG Sentry Logger [log]: [ReactNativeTracing] Starting navigation transaction "Route Change" on scope
LOG Sentry Logger [log]: Setting idle transaction on scope. Span ID: a7c139b65d6cab41
LOG Sentry Logger [log]: [ReactNativeTracing] Starting navigation transaction "Route Change" on scope
LOG Sentry Logger [log]: [Tracing] No active IdleTransaction
LOG Sentry Logger [log]: [Tracing] Discarding transaction because its trace was not chosen to be sampled.
LOG Sentry Logger [log]: [Tracing] No active IdleTransaction
LOG Sentry Logger [log]: [Tracing] Discarding transaction because its trace was not chosen to be sampled.
LOG Sentry Logger [log]: [Tracing] No active IdleTransaction
LOG Sentry Logger [log]: [Tracing] Discarding transaction because its trace was not chosen to be sampled.
LOG Sentry Logger [log]: Setting idle transaction on scope. Span ID: bff56876a83da89c
LOG Sentry Logger [log]: [ReactNativeTracing] Starting navigation transaction "Route Change" on scope
LOG Sentry Logger [log]: [Tracing] No active IdleTransaction
LOG Sentry Logger [log]: [Tracing] Discarding transaction because its trace was not chosen to be sampled.
I want to implement Automatic Instrumentation from sentry documentation, but it is not uploading.
https://docs.sentry.io/platforms/react-native/performance/instrumentation/automatic-instrumentation/
I'm checking on IOS only.
react-native app uses bare workflow for expo. I use sentry's TEAM plan.Is it a bare work flow, so it needs to be set up differently than the document? I have confirmed that I am running react-native link @sentry/react-native
.
https://docs.expo.dev/guides/using-sentry/
- expo ^43.0.0
- sentry-expo ^4.0.0
- expo-device 4.0.3
- expo-constants 12.1.3
- @sentry/react-native 3.4.1
- @react-navigation/native ^5.7.6
- @react-navigation/stack ^5.9.3
// App.tsx
import * as Sentry from "sentry-expo";
import { routingInstrumentation } from "./RootNavigator";
Sentry.init({
dsn: SENTRY_DNS,
enableInExpoDevelopment: true,
debug: true,
environment: isDevProject ? "development" : "production",
integrations: [
new Sentry.Native.ReactNativeTracing({
routingInstrumentation
})
]
});
const App = () => {
...
export default Sentry.Native.wrap(App);
// RootNavigator.tsx
export const routingInstrumentation =
new Sentry.Native.ReactNavigationInstrumentation();
export const RootNavigator = () => {
const navigation = useRef();
return (
<NavigationContainer
ref={navigation}
onReady={() => {
routingInstrumentation.registerNavigationContainer(navigation);
}}
>
<RootStack />
</NavigationContainer>
);
};
log
LOG Sentry Logger [log]: Integration installed: Release
LOG Sentry Logger [log]: Integration installed: InboundFilters
LOG Sentry Logger [log]: Integration installed: FunctionToString
LOG Sentry Logger [log]: Integration installed: Breadcrumbs
LOG Sentry Logger [log]: Integration installed: LinkedErrors
LOG Sentry Logger [log]: Integration installed: Dedupe
LOG Sentry Logger [log]: Integration installed: UserAgent
LOG Sentry Logger [log]: Integration installed: EventOrigin
LOG Sentry Logger [log]: Integration installed: SdkInfo
LOG Sentry Logger [log]: Integration installed: DebugSymbolicator
LOG Sentry Logger [log]: Integration installed: DeviceContext
LOG Sentry Logger [log]: Unhandled promise rejections will be caught by Sentry.
LOG Sentry Logger [log]: Integration installed: ReactNativeErrorHandlers
LOG Sentry Logger [log]: Integration installed: ExpoBareIntegration
LOG Sentry Logger [log]: Integration installed: RewriteFrames
LOG Sentry Logger [log]: [ReactNativeTracing] Native frames instrumentation initialized.
LOG Sentry Logger [log]: Setting idle transaction on scope. Span ID: b83d8034e147174f
LOG Sentry Logger [log]: [ReactNativeTracing] Starting navigation transaction "Route Change" on scope
LOG Sentry Logger [log]: Integration installed: ReactNativeTracing
LOG Sentry Logger [log]: [Tracing] No active IdleTransaction
LOG Sentry Logger [log]: [Tracing] Discarding transaction because its trace was not chosen to be sampled.
LOG Sentry Logger [log]: [Tracing] No active IdleTransaction
WARN Constants.installationId has been deprecated in favor of generating and storing your own ID. Implement it using expo-application's androidId on Android and a storage API such as expo-secure-store on iOS and localStorage on the web. This API will be removed in SDK 44.
LOG Sentry Logger [log]: [ReactNavigationInstrumentation] Navigation container registered, but integration has not been setup yet.
LOG Sentry Logger [log]: Setting idle transaction on scope. Span ID: 9b853cb1f7205d52
LOG Sentry Logger [log]: [ReactNativeTracing] Starting navigation transaction "Route Change" on scope
LOG Sentry Logger [log]: [ReactNavigationInstrumentation] Will not send transaction "HomeScreen" due to beforeNavigate.
LOG Sentry Logger [log]: Setting idle transaction on scope. Span ID: 8ff341d5619f89aa
LOG Sentry Logger [log]: [ReactNativeTracing] Starting navigation transaction "Route Change" on scope
LOG Sentry Logger [log]: Setting idle transaction on scope. Span ID: a7c139b65d6cab41
LOG Sentry Logger [log]: [ReactNativeTracing] Starting navigation transaction "Route Change" on scope
LOG Sentry Logger [log]: [Tracing] No active IdleTransaction
LOG Sentry Logger [log]: [Tracing] Discarding transaction because its trace was not chosen to be sampled.
LOG Sentry Logger [log]: [Tracing] No active IdleTransaction
LOG Sentry Logger [log]: [Tracing] Discarding transaction because its trace was not chosen to be sampled.
LOG Sentry Logger [log]: [Tracing] No active IdleTransaction
LOG Sentry Logger [log]: [Tracing] Discarding transaction because its trace was not chosen to be sampled.
LOG Sentry Logger [log]: Setting idle transaction on scope. Span ID: bff56876a83da89c
LOG Sentry Logger [log]: [ReactNativeTracing] Starting navigation transaction "Route Change" on scope
LOG Sentry Logger [log]: [Tracing] No active IdleTransaction
LOG Sentry Logger [log]: [Tracing] Discarding transaction because its trace was not chosen to be sampled.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以找到有关TracessAmplate属性的更多信息,以及如何将其设置为哨兵文档的生产和开发。
使用SDK配置中的TracessAmplater选项为所有交易设置均匀的样本率,为0到1之间的数字。(例如,要发送20%的交易,将TracessAmplerate设置为0.2
。 ://docs.sentry.io/platforms/react-native/performance/#configure-thempample-sample-rate“ rel =” nofollow noreferrer“> https://docs.sentry.io/platforms/react-native/performance /#configure-the-sample-rate
You can find more about the tracesSampleRate property and how to set it for production and development in the Sentry docs.
Setting a uniform sample rate for all transactions using the tracesSampleRate option in your SDK config to a number between 0 and 1. (For example, to send 20% of transactions, set tracesSampleRate to 0.2.)
More on: https://docs.sentry.io/platforms/react-native/performance/#configure-the-sample-rate
我通过遵循展示据据据称,面临着同样的问题。
由于他们没有提及性能监控,因此在初始化中缺少一个参数:
您可以在哨兵启动器套件套件教程中找到此片段的react-native。
I faced the same issue by following expo-documentation.
As they do not mention performance monitoring, one parameter is missing in the init:
You can find this snippet in the sentry starter kit tutorial for react-native.