Locate and view a session
When users interact with your published bot, session logs are generated. In these set of steps we want to show you how to,
- have a test chat with your bot
- locate the session in the LDS session viewer for a closer look at what happened
In the Session Viewer you can inspect the questions and answers as well as view information about the user input's path through the solution to a response.
Find the latest session
- Navigate to Optimization and select the tab 'Log Data'.
- Open the 'LDS' window (select the option Open under Manage Source).
- Click the button New Session Viewer Tab.
- Under Order By select the options Start Date and Descending.
- Click the Run Query button.
- Double click the topmost session in the query results to view the details of the session.
Locate a particular session
You may want to examine a particular session you discover while running queries against the LDS. In general, your query should display the 'session ID', which you can then copy and use in a more detailed query focused on that session, as well as for locating the session directly in the session viewer for a more detailed examination. We will show you how to do that in these sections.
Display general session information
The following steps show you how to run a query that returns a list of all sessions along with some associated information.
- Open the Longberry Baristas solution.
- Click on the 'Solution' tab, located in the top left corner. Navigate to 'Optimization' and select the tab 'Log Data'.
- Open the LDS window (select the option Open under Manage Source).
- Run a query to display sessions:
la s.beginTime as beginTime, s.id as sessionId, s.transactionCount as numberOfInputs order by beginTime.
- Select a session that looks interesting (due to start time or length) and copy out the session ID.
Run a query to display a transcript of the session
Now that we have a session to explore, we can run a query to show a simple transcript of that session (inputs and outputs). Try this:
1la t.id, t.time, t.e1.userInput, t.e2.answerText: s.id == "<copy your session ID here>" 2
Now you should see a report of each transaction, along with the user input and bot response, for an easy reading of what happened.
Find a session in the session viewer
Sometimes you may want additional detailed information about the session, such as which listeners were active, which variables were set, etc. Perhaps you want to verify that something new that you built is working as expected. In this case, you can view a detailed report of the session, including all events of each of the individual transactions, in the session viewer.
- Open the session viewer by clicking the button New Session Viewer Tab.
- Enter a query:
s.id == "<paste in the session ID here>".
- Click into the session via the result.
From this view, you can expand or hide transaction and event details. Viewing the session in such detail can also be helpful when constructing queries you need to discover more sessions in which something particular happened, e.g. a variable changing while a particular flow is active, etc.