21 Jun 2019 02:52 AM - last edited on 27 Apr 2021 12:09 PM by MaciejNeumann
I'm wanting to get details about User Sessions where the customer has encountered Javascript errors, was hoping I could do this via the query language and API. As I see in the API docs in the model for the UserSession there is an errors object, but I can't see how to query it?
Something as simple as ...
SELECT userId, totalErrorCount, errors FROM usersession WHERE useraction.application='PCIB' AND totalErrorCount > 0 ORDER BY totalErrorCount DESC
Returns that errors is an unknown field.
Solved! Go to Solution.
21 Jun 2019 08:50 AM
Hello,
There is no dimension errors available in this context.
You can do only
SELECT userId, totalErrorCount FROM usersession WHERE useraction.application='PCIB ' AND totalErrorCount > 0 ORDER BY totalErrorCount DESC
Regards,
JLL
25 Jun 2019 12:38 AM
Does that mean the documentation is wrong then? the API docs for the UserSession model?
02 Jul 2019 09:24 AM
I also wanted to have more details on particular errors - now it's not possible to distinguish if the error is an HTTP error or JavaScript error. You even can't search sessions for a particular JavaScript error if you know its name.
Maybe @Klaus E. / @Dominik P. can answer if there is something planned in recent versions.
17 Dec 2019 01:42 PM
The API doc lists the error as a nested object for each session which is true, but you need to query it as JSON to get that. With version 180 you will be able to use the usererror table and query for the same information as in the JSON.
For example:
SELECT * FROM usersession where usererror.name="Javascript error"
Or what the name of the error is.
19 Dec 2019 08:36 AM
Any chance to get these changes to Changelog or a blog post? It seems several important improvements happened under the hood with 180 and 182.
19 Dec 2019 10:09 AM
The blog post about these changes is already published here: https://www.dynatrace.com/news/blog/find-the-user-session-data-you-need-and-better-understand-custom...
19 Dec 2019 02:48 PM
Oh, I forgot about that one (I've seen it already). Just in general, there are often changes in the DEM parts of Dynatrace that do not get it into the changelog or blog posts. For example, the new user action naming UI was like a blast for me - especially when some rules are difficult or impossible to write in the new UI.
I really appreciate the changes, especially about the errors - now being able to determine HTTP errors or custom errors. Kudos to the Dynatrace DEM team 🙂