Socket
Book a DemoInstallSign in
Socket

@embrace-io/react-native-spans

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@embrace-io/react-native-spans

Embrace’s Performance Tracing solution gives you complete visibility into any customized operation you’d like to track, enabling you to identify, prioritize, and resolve any performance issue

latest
Source
npmnpm
Version
5.2.0
Version published
Maintainers
4
Created
Source

React Native Embrace - Performance Tracing

[!IMPORTANT]

This module requires React Native Embrace SDK.

Embrace can collect session data and crashes as you've already seen in the Crash Reporting and Session Reporting sections. Embrace’s Performance Tracing solution gives you complete visibility into any customized operation you’d like to track, enabling you to identify, prioritize, and resolve any performance issue. With our tool, you can quickly spot any bottlenecks in your app’s architecture, pinpoint areas you need to troubleshoot with high precision, and ultimately deliver a truly optimized user experience.

Install the component

yarn add @embrace-io/react-native-spans

Or

npm install @embrace-io/react-native-spans

Adding the component to your code


import { startSpan, stopSpan } from "@embrace-io/react-native-spans";
const App = () => {
  const spanId = useRef<string>();
  const getDataFromServer = () => {
    // Create a span, store the spanId to add Events, Attributes and stop the span
    startSpan(`tracingName`).then((id) => {
      spanId.current = id;
    });
    getData().then(stopTracing);
  };
  const stopTracing = () => {
    // You must stop the tracing
    stopSpan(spanId.current);
  };
  useEffect(() => {
    getDataFromServer();
  }, []);
  return <View />;
};

Keywords

embrace

FAQs

Package last updated on 06 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts