Description
What are you trying to achieve and what is your issue? Please describe.
I'm building an web app for Samsung TVs which run on the Tizen OS and I need to track metrics that are created before my application is requested.
The setup looks like this:
- My app is installed as a simple html file
- When this html file loads it uses the object element to embed my the actual application which is hosted on a public domain:
const webview = document.createElement('object');
webview.setAttribute('type', 'text/html');
webview.setAttribute('data', 'https://domain-for-my-app.com');
document.body.appendChild(webview);
- The parent document gets the resource timing for the embedded app and when the embedded app is ready, the parent document posts a message into it with the resource timing.
How I'm calculating the resource timing:
// "embeddedAppStartTime" is when the embedded app was requested.
const timing = performance.timeOrigin - embeddedAppStartTime
dd.addTiming('app-load-start', timing)
Unfortunately, the RUM UI ends up showing values that are in days and hours whereas they should be in milliseconds.
Describe the solution you'd like
I'd like to be able to submit and view timings that occur before the originTime for the document. With the current approach I am seeing values that are in days and hours but they should be in milliseconds.
Nice to have: It would be great if I could pass these into .addDurationVital()
and have them show in the UI as having occurred before originTime.
Describe alternatives you've considered
There's the approach I've shown above. I'm new to DataDog so maybe there's a better way?