Hi Team,
We are building new Grail-based dashboards (Document app) for our RUM-monitored web applications. To add business context to sessions, we configured User Action Properties that capture JavaScript variables from the page. These properties work in USQL but we cannot find them in DQL.
Additionally, we found significant differences between USQL and DQL session counts for the same application and time range, and contradictory documentation about what sessions USQL includes.
We would appreciate help understanding these differences and the recommended approach going forward.
1. Contradictory documentation: does USQL include active sessions?
We found two official Dynatrace documentation pages that contradict each other:
-
“User sessions and actions USQL reference” states:
“Dynatrace captures user activity in real-time but requires a session to end before data is queryable via USQL.”
-
“USQL - User session query language” states:
“queries always work on the raw user session data that includes both active and already finished user sessions”
Which one is correct? Does USQL return:
- Only completed/finished sessions?
- Both active and completed sessions?
- Something else (e.g., depends on query type)?
This distinction is important because it directly impacts whether DQL and USQL are expected to return the same session counts.
2. DQL vs USQL return very different session counts
For the same application and time range, we get significantly different results.
DQL query (user.events in Grail):
fetch user.events, from:now()-24h
| filter frontend.name == 'My_Application'
| filter view.name == '/my-app/some-page'
| summarize sessions = countDistinct(dt.rum.session.id)
Result: 83 sessions
USQL query (classic):
SELECT COUNT(DISTINCT usersession.userSessionId)
FROM useraction
WHERE useraction.application = 'My Application'
AND useraction.name LIKE '%some-page%'
Result: 35 sessions
The DQL count is 2.4x higher. We noticed that user.events contains multiple characteristics.classifier types per view (request, error, navigation, user_action, page_summary, view_summary, visibility_change, other), so countDistinct(dt.rum.session.id) may be counting sessions across ALL event types.
Questions:
- Are DQL user.events and USQL useraction expected to return the same session counts?
- If not, what is the correct way to get equivalent counts from both?
- Is there a recommended characteristics.classifier filter in DQL to match USQL results?
3. User Action Properties not available in Grail
We configured User Action Properties that capture JavaScript variables from the page to enrich our RUM data with business context. They work correctly in USQL:
SELECT useraction.stringProperties.myCustomProperty, useraction.name
FROM useraction
WHERE useraction.application = 'My Application'
However, we cannot find these properties anywhere in Grail DQL. We tried:
- event_properties.myCustomProperty → undefined
- event_properties.__myCustomProperty__ → undefined
The user.events data object does not seem to expose User Action Properties or Session Properties.
Questions:
- Are User Action Properties available in Grail? If yes, what is the correct field path?
- If not yet available, is there a roadmap for this?
4. Recommended approach for User Action data in new dashboards
Currently, the only way we found to use User Action data (action names with naming rules, properties) in new Grail-based dashboards is by importing the classic SDK in code tiles:
import { rumUserSessionsClient } from "@dynatrace-sdk/client-classic-environment-v1";
const response = await rumUserSessionsClient.getUsqlResultAsTable({ query: usqlQuery });
This works, but it mixes classic and Grail data models and we are unsure about long-term support.
Questions:
- Is there a native DQL way to query User Action data (action names, properties) without using the classic USQL SDK import?
- What is the recommended approach for building new dashboards that need User Action Property data?
Environment: Dynatrace SaaS, Grail active, web applications monitored with RUM (React SPA + JSF legacy).
Thank you in advance for any guidance.