-
Notifications
You must be signed in to change notification settings - Fork 3
Parsing Logs
David Maxwell edited this page Jun 22, 2021
·
1 revision
Interaction logs that you download from the LogUI server are all formatted as a JSON array. Each object within the JSON array is a unique interaction event that has been captured and stored by LogUI. Take a look at the example log entries below, consisting of two unique entries.
[
// First Event
{
"eventType": "statusEvent",
"eventDetails": {
"type": "started",
"browserAgentString": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36",
"screenResolution": {
"width": 1920,
"height": 1080,
"depth": 24
},
"viewportResolution": {
"width": 1920,
"height": 889
}
},
"timestamps": {
"eventTimestamp": "2021-04-24T20:19:15.541Z",
"sinceSessionStartMillis": 27,
"sinceLogUILoadMillis": 27
},
"applicationSpecificData": {
"userId": "user185",
"groupId": "60847d43ae062cf467fdb9fe",
"variant": "mid"
},
"applicationID": "e386d221-1b45-481d-bd3a-ef9d2679e60b",
"flightID": "4246f547-e229-4f58-a5b1-d8ad7c3e0e42",
"sessionID": "e72deba6-bf54-4311-884a-305273c734d1"
},
// Second Event
{
"eventType": "interactionEvent",
"eventDetails": {
"type": "submit",
"name": "FORM_SUBMISSION"
},
"timestamps": {
"eventTimestamp": "2021-04-24T20:19:21.411Z",
"sinceSessionStartMillis": 5897,
"sinceLogUILoadMillis": 5897
},
"applicationSpecificData": {
"userId": "user185",
"groupId": "60847d43ae062cf467fdb9fe",
"variant": "mid"
},
"metadata": [{
"name": "submittedQuery",
"value": "wildlife extinction"
}],
"applicationID": "e386d221-1b45-481d-bd3a-ef9d2679e60b",
"flightID": "4246f547-e229-4f58-a5b1-d8ad7c3e0e42",
"sessionID": "e72deba6-bf54-4311-884a-305273c734d1"
}
]
Note that each JSON object contains key information pertaining to the unique event. Each object will have the following keys.
-
eventType
, denoting what kind of event has been logged; typically this will be aninteractionEvent
, which denotes that a user interaction triggered LogUI. However, in the first example above, astatusEvent
was logged, which if you examine closely, shows that a interaction session began at this point. -
eventDetails
, containing information specific to the event in question. -
timestamps
, containing timestamp data. You can use these key/value pairs to work out the duration between two events, for example. When using a web application that requires users to navigate over multiple webpages, thesinceSessionStartMillis
andsinceLogUILoadMillis
will be different—the first denotes the point at which the session began (the first page load that instantiated LogUI), and the second will denote the time since the page load in which the captured event happened took place. -
applicationSpecificData
reports any application-specific data. In this example, we have provided auserId
,groupId
, andvariant
. - We also include
applicationID
,flightID
, andsessionID
, three values which together uniquely identify the session that this interaction was recorded from. These can be used to filter data by unique sessions, for example.
Note that LogUI is a prototype. New features are to be added and features tweaked over time. Documentation at this Wiki will be updated to reflect the latest iteration of LogUI server.