Introduction:
This wiki page explains the design and implementation of how to log telemetry for stage load progress.
...
- IMPRESSION event before the stage is loaded
{"eid":"IMPRESSION","ets":1549431460158,"ver":"3.0","mid":"IMPRESSION:0f1f82aefd1d1e0fd6c4c0a7ce0efe58","actor":{"id":"9942b170-1fd4-4161-964c-3d70b699f1e9","type":"User"},"context":{"channel":"505c7c48ac6dc1edc9b08f21db5a571d","pdata":{"id":"staging.diksha.app","ver":"2.0.localstaging-debug","pid":"sunbird.app.contentplayer"},"env":"contentplayer","sid":"c89f3277-b20f-410c-8bb6-6b050458a1f0","did":"ceeae2aa2bec16943fe4229564ed1caedf2880f9","cdata":[{"id":"offline","type":"PlayerLaunch"},{"id":"2541eef75f1ad15f1a9d0e6f0edea666","type":"ContentSession"}],"rollup":{"l1":"do_2126647710500290561553"}},"object":{"id":"do_2126647710500290561553","type":"Content","ver":"1.0"},"tags":[],"edata":{"type":"workflow","pageid":"d373ccbc-955d-4b46-bda1-5ad52d54ca3e","uri":""}}
Problem Statement:
Currently, we are not logging the interact event after the stage load. Because of this, we are not able to track the stage load time.
Solution 1:
We need to log the telemetry event after the stage is successfully loaded
...
loader.on("complete", function() {
// Log following telemetry event
}, null, !0),
Event
{ "edata": { "type": "progress", "level": "TRACE", "message": "", // Required. Log message "pageid": "stage_id", "paramsextra": [{{"stageProgress":{
"id":"8c8d4b50-1c59-4355-8042-ae2a84769ab3",
"progress":"100%"
}}
]} } }