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_frame

boolean

experimental
Fixed value true.

true

Long animation frame fields

AttributeTypeDescriptionExamples

loaf.blocking_duration

double

experimental
The time in milliseconds that the long animation frame is blocked. Not reported by older browsers.

0.0; 45.6

loaf.render_start

double

experimental
The time in milliseconds from the frame start to when rendering begins (including style, layout, and paint).

10.5

loaf.style_and_layout_start

double

experimental
The time in milliseconds from the frame start to when the style and layout phase begins.

12.3

loaf.paint_time

double

experimental
The time in milliseconds from the frame start to when the paint phase begins.

30.1

loaf.presentation_time

double

experimental
The time in milliseconds from the frame start to when the frame appears on the screen.

48.9

loaf.first_ui_event_timestamp

double

experimental
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_interaction

boolean

experimental
Indicates that the long animation frame contains a user interaction. Only present when an interaction occurs.

true

loaf.script_count

long

experimental
The total number of scripts that run during the long animation frame.

1; 3

loaf.scripts

record[]

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}

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_task

boolean

stable
Fixed value true.

true

Long task fields

AttributeTypeDescriptionExamples

long_task.name

string

stable
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_id

string

stable
The ID of the container where the long task happened.

app-iframe

long_task.attribution.container_name

string

stable
The name of the container where the long task happened.

app-iframe

long_task.attribution.container_src

string

stable
The source of the container where the long task happened.

http://www.dynatrace.com

long_task.attribution.container_type

string

stable
The type of container where the long task happened.

iframe

long_task.attribution.name

string

stable
The name of the attribution.

unknown