Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Context

This document explains briefly how to consume the information stored within the WayFastStats database. This database receives information directly produced by the frontend while a user navigates different WayFast applications. It collects information including date, project, pagename, username, userid and queries being executed against any DB or API.

LogRequest and LogRequestDetail tables

These tables contain information regarding what a user does while navigating a project. These both provide useful information for log and a troubleshooting purposes.

...

Note: all times are registered in milliseconds.

Examples

Querying LogRequest by username

Code Block
select * from wayfaststats.dbo.logrequest where context_user_name=’user_name’

Querying LogRequest by HostName

Code Block
select * from wayfaststats.dbo.logrequest 
where context_request_hostname=’host_name_in_fqdn_format’

Querying LogRequest by page name

Code Block
select * from wayfaststats.dbo.logrequest 
where context_request_pagename=’page_name_as_defined_in_IDE’

Querying LogRequest with detailed information

Code Block
select * from wayfaststats.dbo.logrequest r 
join wayfaststats.dbo.logrequestdetail d on r.correlationid=d.correlationid 
where date > ‘2023-04-01’

CursorsLog View

This view provides an insight of all DataSets executed as a result of a user request in the frontend. It has detailed information on the parameters being used on each call, making this info useful to track database access and query issues.

Examples

Querying CursorsLog by date, hostname and pagename. Output groups results by execution times only for those over 5 seconds:

Code Block
SELECT
    pagename,
    Host,
    SUBSTRING([Statement], 1, CHARINDEX(' ', [Statement])) AS [Statement],
    [Parameters]
    COUNT(*) AS Executions,
    MAX(ExecutionTime) / 1000.0 AS MAXExecutionTime,
    [MINexecutionTime(s)] = MIN(ExecutionTime) / 1000.0,
    [AVGExecutionTime(s)] = AVG(ExecutionTime) / 1000.0
FROM wayfaststats.dbo.CursorsLog
WHERE
    host LIKE 'host_name' AND
    date >= '2023-04-01'
    AND PageName = 'page_name'
GROUP BY
    pagename,
    Host,
    SUBSTRING([Statement], 1, CHARINDEX(' ', [Statement])),
    [Parameters]
HAVING
    MIN(ExecutionTime) / 1000 > 5
ORDER BY
    [AVGExecutionTime(s)] DESC

...