watchRTC makes the data it collects available to you in a programmable format, consumable by external BI systems via a data streams mechanism.
Data streams aren’t available in all accounts. They require enterprise plans.
What are data streams?
Data streams are a stream of files that store operational data from testRTC products in an easy to consume format for our customers. Data stream files hold arrays of well defined JSON structures, each denoting a specific interaction or event taking place in one of the products.
These files are created at a certain interval, usually measured in hours, enabling the application to grab the file and process it internally by shipping it to its own data warehouse. Customers can use this mechanism to enrich their data or run their own proprietary queries on the data.
Configuring your AWS S3 for data streams
testRTC currently implements data streams using AWS S3 buckets cloud object store.
To use data streams, you will need to create an S3 bucket in your own AWS account, along with the creation of the following permissions for this bucket:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::watchrtc-data-streams/*"
]
}
]
}
Code language: JSON / JSON with Comments (json)
Once created, pass to our support the following parameters:
- accessKeyId
- secretAccessKey
- S3 bucket name
- Filename prefix
- Collection interval (in minutes)
watchRTC data streams
Data streams in watchRTC are generated on the room level. Once a data stream file needs to be created for watchRTC, watchRTC will collect all history results for the time interval configured and generate a JSON struct per room, placing all these rooms in the data stream file and storing that file into the configured object store.
Detailed below is the structure of the JSON structure you can expect:
[
{
"room_url": "https://app.testrtc.com/app/watchrtc-room/xxxxxx",
"room_id": "roomid",
"start_time": "2022-09-04T00:09:22.885Z",
"end_time": "2022-09-04T00:17:06.149Z",
"duration": 463, // in seconds
"users": 2, // number of peers in the room
"stats": {
"mos": 4.35, // MOS score
"score": 6, // testRTC media score
"call_setup_time": 900, // in milliseconds
"audio": {
"send": {
"bitrate": 11, // in kbit/s
"packet_loss": 6.1, // in percentage
"jitter": 6, // in milliseconds
"rtt": 2397 // in milliseconds
},
"recv": {
"bitrate": 20, // in kbit/s
"packet_loss": 0.2, // in percentage
"jitter": 15 // in milliseconds
},
"bitrate": 16, // in kbit/s
"packet_loss": 3.2, // in percentage
"jitter": 11 // in milliseconds
},
"video": {
"send": {
"bitrate": 1499, // in kbit/s
"packet_loss": 4.5, // in percentage
"jitter": 48, // in milliseconds
"rtt": 1073 // in milliseconds
},
"recv": {
"bitrate": 109, // in kbit/s
"packet_loss": 0.1, // in percentage
"jitter": 43 // in milliseconds
},
"bitrate": 804, // in kbit/s
"packet_loss": 2.3, // in percentage
"jitter": 46 // in milliseconds
}
"peers": [
{
"peer_id": "peerid",
"os": "Linux",
"os_version": "64-bit",
"browser": "Chrome",
"browser_version": "102.0.5005.61",
"location": {
"city": "Frankfurt am Main",
"country": "Germany",
"organization": "Google" // ISP or carrier
},
"sdk_version": "1.34.1-beta.1",
"start_time": "2022-06-24T06:37:35.547Z",
"duration": 392, // in seconds
"keys": {
"keyA": "valueA",
"keyB": "valueB"
...
},
"features": {
"connection_type": "TURN",
"media_transport": "udp" // udp/tcp/tls
},
"stats": {
"mos": 3.29,
"score": 5.9,
"call_setup_time": 164,
"audio": {
"send": {
"mos": 3.29,
"score": 5.9,
"bitrate": 13,
"packet_loss": 3.6,
"jitter": 8,
"rtt": 428
},
"recv": {
"mos": 3.29,
"score": 5.9,
"bitrate": 24,
"packet_loss": 0.1,
"jitter": 4
},
"bitrate": 19,
"packet_loss": 1.9,
"jitter": 6
},
"video": {
"send": {
"mos": 3.29,
"bitrate": 1596,
"packet_loss": 2.7,
"jitter": 15,
"rtt": 159
},
"recv": {
"mos": 3.29,
"bitrate": 68,
"packet_loss": 0.1,
"jitter": 13
},
"bitrate": 832,
"packet_loss": 1.4,
"jitter": 14
}
},
"audio_device": "Fake Default Audio Input",
"video_device": "/video/KrankyGeek-1080p.y4m"
},
...
]
}
]
Code language: JSON / JSON with Comments (json)