
Unlocking Live Streaming Analytics: Amazon IVS and Datadog Integration - Part 2
Learn how to build a Datadog dashboard to monitor Amazon IVS playback metrics in real-time.
- Time to Video is the time it takes for the player to get the first frame of video and play it. The lower the time to video the better. This data point is crucial for engaging users and preventing them from abandoning the video.
- Playback Latency Percentiles measures the distribution of delays between the time a video is sent from Amazon IVS servers and the time it is received and displayed by the Amazon IVS Player. This metric reports the 50th, 75th, 90th, and 95th percentile values of the playback latency distribution, providing insights into the higher end of the latency range experienced by viewers. Unlike an average, these percentile values are not skewed by outliers and better represent the typical and worst-case latency experienced by most viewers.
- Unique Users by Rendition provides insights into the viewing experience of your live stream audience. It tracks the number of distinct users watching at each available video quality or "rendition" of the stream. This metric can help us understand the distribution of users across different bitrates and resolutions.
- Errors Per Minute Per Channel is the number of errors that occur during video playback per minute of watched video by Amazon IVS channel. The IVS Player emits three possible error types. We will also create a widget on our dashboard to display the total number of errors emitted in a given time period and what those errors are.
- Rebuffering Percentage measures the proportion of a viewer's total watch time that was spent waiting for video segments to download. This metric captures the average amount of time a viewer had to pause playback and wait for the video stream to buffer, relative to their total viewing time. A higher rebuffering percentage indicates more interruptions and a poorer viewing experience, as viewers had to spend a greater fraction of their session waiting for the video to resume playing.
- Average playback time measures the average duration viewers spend watching the live stream, providing insights into audience engagement and content popularity.
- Unique users is the number of distinct users that have accessed the live stream, providing insights into the overall audience size and reach of the content. To achieve this, recall that the data we sent to Datadog in the previous article was enriched with a custom generated unique user ID.
- Unique User Count Per Top 10 Channels tracks the number of distinct users that have accessed the live stream on a specific Amazon IVS channel for the top 10 channels. This metric helps provide insights into the overall audience size and engagement for a particular channel.
- Unique Users by Client Platform tracks the number of distinct users viewing the live stream, categorized by the operating system or device type (e.g. iOS, Android, web browser). This will help us understand the distribution of our audience across different client platforms, allowing us to prioritize features that would enhance the viewing experience for the most popular platforms.
- Percent Time Buffering by Channel Watched measures the percentage of time viewers spend waiting for the video to buffer during playback, broken down by the specific channel they are watching. This metric helps identify any issues with video delivery or encoding that may be causing increased buffering for viewers on certain channels, allowing you to troubleshoot and optimize the experience.
- Unique Users by Region will show a color coded map of unique users by region. Darker regions indicate more users while lighter regions indicate less users. Hovering over a region will show a popup of the number of users viewing from that region. The Datadog RUM Browser SDK collects the end viewer’s country by default among other default attributes.
- Facets are attributes we can use to filter and group our data. These are typically categorical or discrete values. The user_id attribute for example would be a facet.
- Measures are numerical values we can perform calculations on (sum, average, etc.). The live_latency_ms attribute would be a measure for example.
PLAYBACK_SUMMARY
live_latency_ms
.- In the popup window, select the Measure tab.
- Leave the checkbox on “Use path as display name”. Path is used when we build a query to graph the data which will cover later.
- Select Integer from the Type dropdown
- Select Millisecond (ms) from the Unity dropdown.
live_latency_ms
as a facet, this takes us back to the custom attributes screen. While we are here, repeat this step for the following attributes creating them as either a measure of facet and selecting the appropriate type and unit as noted in the following table. The metrics we will derive from them by building queries in Datadog is also noted alongside each attribute.Attribute | Measure/Facet | Type | Unit | Derived Metric |
---|---|---|---|---|
live_latency_ms | Measure | Integer | Millisecond (ms) | Playback Latency Percentiles |
buffering_time_ms | Measure | Integer | Millisecond (ms) | Rebuffering Percentage Per Channel Watched |
channel_watched | Facet | String | N/A | Unique Session Count Per Channel |
client_platform | Facet | String | N/A | Sessions by client platform |
error_count | Measure | Integer | None | Average Error Count |
playing_time_ms | Measure | Integer | Millisecond (ms) | Average Playback Time |
rendition_name | Facet | String | N/A | Unique Sessions by Rendition |
session_id | Facet | String | N/A | Unique Session Count Per Channel |
startup_latency_ms | Measure | Integer | Millisecond (ms) | Time to video |
user_id | Facet | String | N/A | Unique sessions |
Once confirmed, you should then see a dashboard similar to the following. If you don’t, follow the steps in the next section to create the widgets individually.
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter @context.live_latency_ms:* as action to filter on
- The calculation method should default to “Measure of”
- Enter “context.live_latency_ms” as the measure
- Select a distribution of all points
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.user_id as the measure and select the “Count unique of” operation from the dropdown and group by “context.rendition_name”. The group by field shows “Rendition Name” because in this example
- There are only five possible renditions (160p, 360p, 480p, 360p,and 1080p)
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.error_count as the measure and select the “Sum of” operation from the dropdown
- Enter context.channel_watched in the group by field Limit it to the top 1,000 channels being watched by selecting “top” and then “1000” in the operation field.
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.buffering_time_ms as the measure
- Select “Sum of” as the calculation next to the measure
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.playing_time_ms as the measure
- Select “Sum of” as the calculation next to the measure
- Click add formula and enter the following expression
- a / b * 100
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.playing_time_ms as the measure and select the “Avg of” operation from the dropdown
- Leave everything else as default
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter @context.user_id:* as the attribute to filter on
- Enter context.user_id as the measure
- Group by “Everything”
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.user_id as the measure
- Enter context.channel_watched in the group by field
- Limit it to the top 10 channels watched by selecting “top” and then “10” in the operation field
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.user_id as the measure
- Enter context.cleint_platform in the group by field
- Limit it to the top 5 platforms by selecting “top” and then “5” in the operation field. We only have three client platforms, including web, iOS, and Android so this will capture all of them.
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.buffering_time ms as the measure and select the “Sum of” operation from the dropdown
- Enter context.channel_watched as the group by field limiting to the top 1,000 channels
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.playing_time_ms as the measure and select the “Sum of” operation from the dropdown
- Enter context.channel_watched as the group by field limiting to the top 1,000 channels
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.user_id ms as the measure and select “Count unique of” from the dropdown next to it if it isn’t selected by default
- Leave the group by field as “Country ISO Code” as is. You can choose to leave it as top 10 or another value of your choice
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.buffering_time_ms as the measure and select the “Average” operation
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.user_id as the measure making sure to select the “Unique” operation to count only unique user_ids
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.playing_time_ms as the measure and select the “Average” operation
- Group by “Country ISO Code” limiting it to the top 10
- For the display type, select “Bars”
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.startup_latency as the measure making sure to select the “Average” operation
- For the display type, select “Lines”
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.startup_latency_ms as the measure and select the “Average” operation
- Select RUM as the metric category to filter from the dropdown menu
- Select Actions from the next dropdown to filter on custom actions
- Enter context.user_id as the measure making sure to select the “Count unique of” operation
- Unique Users
- Time to Video
- Average playback time
- Playback Latency Percentiles
- Unique Sessions by Region
- Unique Sessions By Client Platform
- Unique Users by Rendition
- Unique User Count Per Top 10 Channel
- Rebuffering Percentage
- Percent Time Buffering by Channel Watched
- Errors per Minute per Channel
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.