Custom Spans
Manually instrument parts of your Android app with Custom Spans to time specific operations, then see them in the Spans timeline next to APM data.
Overview
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.
Setup Custom Spans
To log a new custom spans, please use the below API
val span: CustomSpan? = APM.startCustomSpan(name:string)
span?.end()let span: CustomSpan? = APM.startCustomSpan(_ name: String)
span?.end()To log a completed span, use the below API
APM.addCompletedCustomSpan(name:String, startDate: Date, endDate: Date)APM.addCompletedCustomSpan(name: String, startDate: Date, endDate: Date)Last updated