I'm trying to get the events/actions for a specific session.
I have tried this query:
Solved! Go to Solution.
Having a look at the query there is no need for this ((useraction.application='site.com' OR userevent.application='site.com' OR usererror.application='site.com')) AND userId IS "User Name" AND as later on in the query you are specifying a session ID which doesn't need an application or user ID to narrow down a query. So if you already know the ID of the session then all you need to do is:
SELECT userevent.* FROM usersession WHERE usersession.userSessionId IS "sessionID"
This returns the events from a session with ID "sessionID".
That works fine in the site, but when I make the API call using Postman it doesn't return anything.
Another thing I noticed is that the Dynatrace site has an IP address that doesn't match anything in my webserver logs. Any idea why the don't match?
Thanks for the help
The only thing I can think of as to why it wouldn't work is that you haven't specified a timeframe to search within and if you don't specify a timeframe then it defaults to the last 2 hours. As you can see in the following image I specified a starting time as a query parameter.
As for the IP addresses not matching check the settings page for your application as by default I believe they are set to be masked to comply with regulations.