Company
Date Published
Author
Jenn Mueng
Word count
1378
Language
English
Hacker News points
None

Summary

Sentry's Performance instrumentation provides support for React Native applications, enabling developers to monitor and analyze their app's performance. Jenn Mueng, a developer who contributes to Tour, a travel app built with React Native, shares his experience of setting up Performance monitoring using Sentry. He starts by installing the SDK and setting it up for basic monitoring, including routing instrumentation. To further instrument his code, he uses Promises, which are wrapped in helper functions called `withTransaction` and `withSpan` to record duration-based events. Jenn also introduces the concept of a "transaction hub," a simple exported object that holds active transactions, making it easier to start and finish transactions throughout the app. Additionally, he discusses instrumenting real-time data flows by extending the transaction hub with additional features such as timestamping and span creation for each write operation. By using Sentry's Performance instrumentation, developers can gain insights into their app's performance, identify slow operations, and optimize their code for better user experience.