|
| 1 | +--- |
| 2 | +title: Azure Communication Services call client media statistics log schema |
| 3 | +titleSuffix: An Azure Communication Services concept article |
| 4 | +description: Learn about the voice and video call client media statistics time series logs. |
| 5 | +author: amagginetti |
| 6 | +services: azure-communication-services |
| 7 | + |
| 8 | +ms.author: amagginetti |
| 9 | +ms.date: 02/04/2025 |
| 10 | +ms.topic: conceptual |
| 11 | +ms.service: azure-communication-services |
| 12 | +ms.subservice: calling |
| 13 | +--- |
| 14 | + |
| 15 | +# Call client media statistics time series log schema |
| 16 | + |
| 17 | +The **call client media statistics time series** log provides |
| 18 | +client-side information about the media streams between individual |
| 19 | +participants involved in a call. These logs are currently in limited preview and provide detailed time series |
| 20 | +data on the audio, video, and screen share media steams between |
| 21 | +participants with a default 10-seconds aggregation interval. The logs contain granular time series information about media stream type, direction, codec, and bitrate properties (for example, max, min, average). |
| 22 | + |
| 23 | + |
| 24 | +This log provides more detailed information than the call diagnostics log |
| 25 | +to understand the quality of media steams between participants. It can be used to |
| 26 | +visualize and investigate quality issues for your calls through call |
| 27 | +diagnostics for your Azure Communication Services Resource. [Learn more about call diagnostics](../../voice-video-calling/call-diagnostics.md) |
| 28 | + |
| 29 | + |
| 30 | +## How to use call logs |
| 31 | +We recommend you collect all available call logs in a log analytics resource so you can monitor your call usage and improve your call quality and receive new logs from Azure Communication Services as we release them. |
| 32 | + |
| 33 | +There are two main tools you can use to monitor your calls and improve call quality. |
| 34 | +- [Voice and video insights dashboard](../insights/voice-and-video-insights.md) |
| 35 | +- [Call diagnostics](../../voice-video-calling/call-diagnostics.md) |
| 36 | + |
| 37 | +We recommend using the **[voice and video insights dashboard](../insights/voice-and-video-insights.md)** dashboards to start |
| 38 | +any quality investigations, and using **[call diagnostics](../../voice-video-calling/call-diagnostics.md)** as needed to explore individual calls when you need granular detail. |
| 39 | + |
| 40 | + |
| 41 | +## Data concepts |
| 42 | + |
| 43 | +> [!IMPORTANT] |
| 44 | +>You must collect logs if you want to analyze them. To learn more, see: **[How do I store logs?](#how-do-i-store-logs)** |
| 45 | +> |
| 46 | +>Azure doesn't store your call log data unless you enable these specific Diagnostic Settings. Your call data isn't retroactively available. You accumulate data once you create the Diagnostic Settings. |
| 47 | +
|
| 48 | +## Data definitions |
| 49 | + |
| 50 | +### Call client media statistics time series log schema |
| 51 | + |
| 52 | +This table describes each property. |
| 53 | + |
| 54 | + |
| 55 | +| Property | Description | |
| 56 | +|--- |--- | |
| 57 | +| `OperationName` | The operation associated with the log record. | |
| 58 | +| `CallId` | The unique ID for a call. It identifies correlated events from all of the participants and endpoints that connect during a single call, and you can use it to join data from different logs. It's similar to the correlationId in call summary log and call diagnostics log. | |
| 59 | +| `CallClientTimeStamp` | The timestamp when the media stats is recorded. | |
| 60 | +| `MetricName` | The name of the media statistics, such as `Bitrate`, `JitterInMs`, `PacketsPerSecond`, and so on. | |
| 61 | +| `Count`| The number of data points sampled at a given timestamp. | |
| 62 | +| `Sum` | The sum of metric values of all the data points sampled. | |
| 63 | +| `Average` | The average metric value of the data points sampled. Average = Sum / Count. | |
| 64 | +| `Minimum` | The minimum of metric values of all the data points sampled. | |
| 65 | +| `Maximum` | The maximum of metric values of all the data points sampled. | |
| 66 | +| `MediaStreamDirection` | The direction of the media stream. It can be `send` or `receive`. | |
| 67 | +| `MediaStreamType` | The type of the media stream. It can be `video`, `audio`, or `screen`. | |
| 68 | +| `MediaStreamCodec` | The codec used to encode/decode the media stream, such as `H264`, `OPUS`, `VP8`, and so on. | |
| 69 | +| `ParticipantId` | The unique ID generated to represent each endpoint in the call. | |
| 70 | +| `ClientInstanceId` | The unique ID representing the Call Client object created in the calling SDK. | |
| 71 | +| `EndpointId` | The unique ID that represents each endpoint that is connected to the call. EndpointId can persist for the same user across multiple calls (`callIds`) for native clients but is unique for every call when the client is a web browser. The `EndpointId` isn't currently instrumented in this log. When implemented, it matches the values in CallSummary/Diagnostics logs | |
| 72 | +| `RemoteParticipantId` | The unique ID that represents the remote endpoint in the media stream. For example, a user can render multiple video streams for the other users in the same call. Each video stream has a different `RemoteParticipantId`. | |
| 73 | +| `RemoteEndpointId` | Same as `EndpointId`, but it represents the user on the remote side of the stream. | |
| 74 | +| `MediaStreamId` | A unique ID that represents each media stream in the call. `MediaStreamId` isn't currently instrumented in clients. When implemented, it matches the `streamId` column in CallDiagnostics logs. | |
| 75 | +| `AggregationIntervalSeconds` | The time interval for aggregating the media statistics. Currently in the Calling SDK, media metrics are sampled every 1 second, and when we report in the log we aggregate all samples every 10 seconds. So each row in this table has, at most, 10 sampling points. | |
| 76 | + |
| 77 | + |
| 78 | +## Sample data for various call types |
| 79 | + |
| 80 | +### Call client media statistics logs for P2P and group calls |
| 81 | + |
| 82 | +For call client media stats time series log, there's no difference between P2P and group call scenarios. The number of logs depends on the SDK operations and call duration. The following code is a generic sample showing the schema of these logs. |
| 83 | + |
| 84 | +#### Call client media statistics time series log |
| 85 | + |
| 86 | +Here's an example of media statistics time series log. It shows the participant's Jitter metric for receiving an audio stream at a specific timestamp. |
| 87 | + |
| 88 | +```json |
| 89 | +"properties": { |
| 90 | + "TenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee", |
| 91 | + "TimeGenerated": "2024-01-10T07:36:51.771Z", |
| 92 | + "OperationName": "CallClientMediaStatsTimeSeries" , |
| 93 | + "CallId": "92d800c4-abde-40be-91e9-3814ee786b19", |
| 94 | + "CallClientTimeStamp": "2024-01-09T15:07:56.066Z", |
| 95 | + "MetricName": "JitterInMs", |
| 96 | + "Count": "2", |
| 97 | + "Sum": "34", |
| 98 | + "Average": "17", |
| 99 | + "Minimum": "10", |
| 100 | + "Maximum": "25", |
| 101 | + "MediaStreamDirection": "recv", |
| 102 | + "MediaStreamType": "audio", |
| 103 | + "MediaStreamCodec": "OPUS", |
| 104 | + "ParticipantId": "2656fd6c-6d4a-451d-a1a5-ce1baefc4d5c", |
| 105 | + "ClientInstanceId": "d08a3d05-db90-415f-88a7-87ae74edc1dd", |
| 106 | + "AggregationIntervalSeconds": "10", |
| 107 | + "Type": "ACSCallClientMediaStatsTimeSeries" |
| 108 | +} |
| 109 | +``` |
| 110 | + |
| 111 | +Each participant can have many different media statistics metrics for a call. The following query can be run in Log Analytics in Azure portal to show all possible metrics in this log: |
| 112 | + |
| 113 | +`ACSCallClientMediaStatsTimeSeries | distinct MetricName` |
| 114 | + |
| 115 | +## Frequently asked questions |
| 116 | + |
| 117 | +### How do I store logs? |
| 118 | +The following section explains this requirement. |
| 119 | + |
| 120 | +Azure Communication Services logs aren't stored in your Azure account by default so you need to begin storing them in order for tools like [voice and video insights dashboard](../insights/voice-and-video-insights.md) and [call diagnostics](../../voice-video-calling/call-diagnostics.md) to work. To collect these call logs, you need to enable a diagnostic setting that directs the call data to a Log Analytics workspace. |
| 121 | + |
| 122 | +**Data isn’t stored retroactively, so you begin capturing call logs only after configuring the diagnostic setting.** |
| 123 | + |
| 124 | +Follow instructions to add diagnostic settings for your resource in [Enable logs via Diagnostic Settings in Azure Monitor](../enable-logging.md). We recommend that you initially **collect all logs**. After you understand the capabilities in Azure Monitor, determine which logs you want to retain and for how long. When you add your diagnostic setting, you're prompted to [select logs](../enable-logging.md#adding-a-diagnostic-setting). To collect **all logs**, select **allLogs**. |
| 125 | + |
| 126 | +Your data volume, retention, and usage in Log Analytics within Azure Monitor is billed through existing Azure data meters. We recommend that you monitor your data usage and retention policies for cost considerations as needed. For more information, see [Controlling costs](/azure/azure-monitor/essentials/diagnostic-settings#controlling-costs). |
| 127 | + |
| 128 | +If you have multiple Azure Communications Services resource IDs, you must enable these settings for each resource ID. |
| 129 | + |
| 130 | +## Next steps |
| 131 | + |
| 132 | +- Review the overview of all voice and video logs, see: [Overview of Azure Communication Services call logs](voice-and-video-logs.md) |
| 133 | + |
| 134 | +- Learn best practices to manage your call quality and reliability, see: [Improve and manage call quality](../../voice-video-calling/manage-call-quality.md) |
| 135 | + |
| 136 | +- Learn about the [insights dashboard to monitor Voice Calling and Video Calling logs](/azure/communication-services/concepts/analytics/insights/voice-and-video-insights). |
| 137 | + |
| 138 | +- Learn how to use call logs to diagnose call quality and reliability |
| 139 | + issues with Call Diagnostics, see: [Call Diagnostics](../../voice-video-calling/call-diagnostics.md) |
0 commit comments