Skip to content

Instantly share code, notes, and snippets.

@vishalratna-microsoft
Last active December 11, 2021 15:55
Show Gist options
  • Save vishalratna-microsoft/1989bec0aa6084e2a9c203cf34120220 to your computer and use it in GitHub Desktop.
Save vishalratna-microsoft/1989bec0aa6084e2a9c203cf34120220 to your computer and use it in GitHub Desktop.
Start and end the measurement using tags.
class NewsApplication : Application() {
override fun onCreate() {
super.onCreate()
if(BuildConfig.DEBUG) {
Snippet.install(Snippet.MeasuredExecutionPath())
Snippet.newFilter("Carausell")
Snippet.addFlag(Snippet.FLAG_METADATA_LINE or Snippet.FLAG_METADATA_THREAD_INFO)
}
Snippet.startCapture("app_launch") // Starts the measurements and assigns a tag. Internally a log token is created
// representing this measurement that can be fetched using the Snippet.find(String) method.
// ... more code followed
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment