Support & information center

Data Streams in watchRTC

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-06-24T06:30:02.832Z", "duration": 392, // 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": 13284, // in kbit/s "packet_loss": 0.1, // in percentage "jitter": 4, // in milliseconds "rtt": 128 // in milliseconds }, "recv": { "bitrate": 13277, // in kbit/s "packet_loss": 0.1, // in percentage "jitter": 4 // in milliseconds } }, "video": { "send": { "bitrate": 1320092, // in kbit/s "packet_loss": 0.1, // inpercentage "jitter": 27, // in milliseconds "rtt": 194 // in milliseconds }, "recv": { "bitrate": 883556, // in kibt/s "packet_loss": 0, // in percentage "jitter": 18 // 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" }, "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": { "call_setup_time": 410, "audio": { "send": { "bitrate": 15574, "packet_loss": 0, "jitter": 3, "rtt": 31 }, "recv": { "bitrate": 12759, "packet_loss": 0.2, "jitter": 12 } }, "video": { "send": { "bitrate": 856695, "packet_loss": 0, "jitter": 14, "rtt": 50 }, "recv": { "bitrate": 1220561, "packet_loss": 0.1, "jitter": 22 } } } }, ... ] } ]
Code language: JSON / JSON with Comments (json)

Was this article helpful?

Related Articles