Custom Spans
Create custom spans in your React Native app with Luciq to measure performance of specific code sections. Identify bottlenecks and optimize critical paths.
Last updated
Create custom spans in your React Native app with Luciq to measure performance of specific code sections. Identify bottlenecks and optimize critical paths.
Custom Spans allow you to manually instrument parts of your application and measure how long specific operations take. This helps you track performance for specific spans that are not automatically captured.
Custom spans appear in the Spans timeline alongside automatically collected spans. They will appear inside all APM metrics we already capture such as app launches, screen loading, network logs and Flows. The backend correlates the custom span with its respective metrics based on their timestamps.
To log a new custom spans, please use the below APIs
let span = await APM.startCustomSpan(name: String);
span.end()To log a completed span, use the below API
APM.addCompletedCustomSpan(name: String, startDate: Date, endDate: Date)
Considerations for creating Custom Spans
APM must be enabled to use Custom Spans
Luciq SDK must be initialized before calling the API
Custom span name cannot be empty
Maximum 100 spans per session (older spans may be dropped if the limit is exceeded
Last updated