Try it free

Long tasks and long animation frames

  • Latest Dynatrace
  • Reference

Long task and long animation frame (LoAF) user events capture browser main-thread blocking that degrades user experience and performance.

Long animation frame

A long animation frame (LoAF) is a rendering update that takes more than 50 milliseconds, blocking the browser's main thread and potentially degrading user experience. Dynatrace RUM detects them using the W3C Long Animation Frames API and captures them as individual user events. Only supported by RUM JavaScript.

Query

This query searches for all long animation frames.

fetch user.events
| filter characteristics.has_long_animation_frame

Long animation frame characteristics fields

AttributeTypeDescriptionExamples
characteristics.has_long_animation_framebooleanexperimental
Fixed value true.
true

Long animation frame fields

AttributeTypeDescriptionExamples
loaf.blocking_durationdoubleexperimental
The time in milliseconds that the long animation frame is blocked. Not reported by older browsers.
0.0; 45.6
loaf.render_startdoubleexperimental
The time in milliseconds from the frame start to when rendering begins (including style, layout, and paint).
10.5
loaf.style_and_layout_startdoubleexperimental
The time in milliseconds from the frame start to when the style and layout phase begins.
12.3
loaf.paint_timedoubleexperimental
The time in milliseconds from the frame start to when the paint phase begins.
30.1
loaf.presentation_timedoubleexperimental
The time in milliseconds from the frame start to when the frame appears on the screen.
48.9
loaf.first_ui_event_timestampdoubleexperimental
The time in milliseconds from the frame start to the first UI event processed in this frame. The value can be negative when the UI event is queued before the frame starts.
-5.2; 0.0; 10.0
loaf.has_interactionbooleanexperimental
Indicates that the long animation frame contains a user interaction. Only present when an interaction occurs.
true
loaf.script_countlongexperimental
The total number of scripts that run during the long animation frame.
1; 3
loaf.scriptsrecord[]experimental
The slowest scripts (up to 3) that run during the long animation frame, each containing invoker_type, start_time, duration, and optional attribution details such as invoker, forced_style_and_layout_duration, source_url, source_function_name, source_char_position, and window_attribution.
{'invoker_type': 'event-listener', 'invoker': 'BUTTON#submit.onclick', 'start_time': 0.0, 'duration': 55.0}

Basic user event fields

The basic attributes for all user events are defined in the user event base model.

Long task

A long task is a browser task that occupies the main UI thread long enough to cause high or variable input latency and prevent users from interacting with the page. Long tasks are detected using the W3C Long Tasks API. Dynatrace RUM captures long tasks as individual user events and also aggregates them within page summary and view summary events. Only supported by RUM JavaScript.

Query

This query searches for all long tasks.

fetch user.events
| filter characteristics.has_long_task == true

Long task characteristics fields

AttributeTypeDescriptionExamples
characteristics.has_long_taskbooleanstable
Fixed value true.
true

Long task fields

AttributeTypeDescriptionExamples
long_task.namestringstable
One of the following strings refers to the browsing context or frame that can be attributed to the long task: cross-origin-ancestor, cross-origin-descendant, cross-origin-unreachable, multiple-contexts, same-origin-ancestor, same-origin-descendant, same-origin, self, unknown.
cross-origin-ancestor
long_task.attribution.container_idstringstable
The ID of the container where the long task happened.
app-iframe
long_task.attribution.container_namestringstable
The name of the container where the long task happened.
app-iframe
long_task.attribution.container_srcstringstable
The source of the container where the long task happened.
http://www.dynatrace.com
long_task.attribution.container_typestringstable
The type of container where the long task happened.
iframe
long_task.attribution.namestringstable
The name of the attribution.
unknown

Basic user event fields

The basic attributes for all user events are defined in the user event base model.