Simple library for tracing JavaScript
with Google's Trace Event.
Getting Started
Installation
Install with npm:
npm install --save recall
Or with yarn:
yarn add recall
Examples
const trace = tracetrace // Start fetching data, while the rest of the app tries to rendertracetrace // Time the re-render with datatracetrace // Log as a tableconsole
Usage
Generating a trace event
const trace = // You can either use a string as your message// with optional properties to add contexttrace // Or you can pass in an `analytics-event` compatible objecttrace // Or you can manually generate the eventtrace
Logging the trace
const trace = flush: async { await } tracetrace trace trace // When you're ready to send the tracetracecomplete// Or if the user navigates off the pagewindow trace
Frequently Asked Questions
What is Google Trace Event?
The Google Trace Event Format is a data representation that is processed by the Google Trace Viewer application. These are the same events that are used in Google Chrome and Node.js tracing. You can read more here.
Contributing
All contributions are welcome! recall
is MIT-licensed.