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,
  • then 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

  1. Navigate to Optimization and select the tab Log Data.
  2. Open the LDS window (select the option Open under Manage Source).
  3. Click the button New Session Viewer Tab.
  4. Under Order By select the options Start Date and Descending.
  5. Click the Run Query button.
  6. Double click the topmost session in the query results to view the details of the session.

This short video demonstrates how to find the latest logged session.

Note: if you haven't yet published your bot you will not find a Log Data Source listed under Optimization. In case you have published your bot, and no one has chatted with it, the LDS will exist but be empty. Please refer to the section on how to generate session logs.

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 then copy out and use in a more detailed query focused on that session, as well as locating the session directly in the session viewer, for a more detailed examination. We 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.

  1. Open the Longberry Baristas solution.
  2. Navigate to Optimization and select the tab Log Data
  3. Open the LDS window (select the option Open under Manage Source)
  4. Run a query to display sessions: la s.beginTime as beginTime, s.id as sessionId, s.transactionCount as numberOfInputs order by beginTime
  5. 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 transacript of that session (inputs and outputs). Try this:

la t.id, t.time, t.e1.userInput, t.e2.answerText: s.id == "<copy your session ID here>"

Now you see a report of each transaction, along with the user input and bot response, for an easy reading of what happened. transcript of session

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 in the session viewer including all events of each of the individual transactions.

  1. Open the session viewer by clicking the button New Session Viewer Tab
  2. Enter a query: s.id == "<paste in the session ID here>"
  3. Click into the session via the result

locate session in session viewer

From this view you can expand or hide transaction and event details. Viewing the session in such detail can also be helpful in constructing queries you need to discover more sessions in which something particular happened, for example: a variable changing while a particular flow is active, etc.

Was this page helpful?