From 3bb07b508efdd709bfda3e061948858272b47d35 Mon Sep 17 00:00:00 2001
From: Walker Frankenberg
Date: Thu, 28 Mar 2024 10:02:36 -0700
Subject: [PATCH 1/8] Mux Data Realtime Samples
---
realtime_samples/README.md | 13 ++++
realtime_samples/realtime_samples.proto | 89 +++++++++++++++++++++++++
2 files changed, 102 insertions(+)
create mode 100644 realtime_samples/README.md
create mode 100644 realtime_samples/realtime_samples.proto
diff --git a/realtime_samples/README.md b/realtime_samples/README.md
new file mode 100644
index 0000000..f86a753
--- /dev/null
+++ b/realtime_samples/README.md
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+# Mux Data Realtime Samples
+
+Mux provides a mechanism for partners to subscribe to realtime video view level datastream of events and measurements related to the quality of service for integrated customers. Realtime Samples are provided with 30 second granularity. This can be used to identify service-level problems, such as widespread rebuffering or playback failures.
+
+The data is delivered in nested Protobuf format. A single stream samples “payload” may contain multiple samples from both time ranges and customer id’s.
+
+Each sample corresponds to a single active video view. The sample can contain multiple records, where each record contains metrics for a point in time for the video view. A record specifies a time period and Metrics measured over that time period. All Metrics inside a single record will apply to the time range implied by the “start” timestamp field plus the “duration_ms” field. If the duration field is zero, the Record includes instantaneous Metrics. A Record MUST contain at least one Metric.
diff --git a/realtime_samples/realtime_samples.proto b/realtime_samples/realtime_samples.proto
new file mode 100644
index 0000000..811f16d
--- /dev/null
+++ b/realtime_samples/realtime_samples.proto
@@ -0,0 +1,89 @@
+syntax = "proto2";
+
+package com.mux.realtime;
+
+option go_package = "github.com/muxinc/mux/data/proto/golang/realtime";
+
+// Make our own timestamp, since we are trapped in
+// Protobuf 2.x for the time being.
+message Timestamp {
+ optional int64 seconds = 1;
+ optional int32 nanos = 2;
+}
+
+message Samples {
+ repeated Sample samples = 1;
+}
+
+message Sample {
+ // A v4 UUID Mux used to identify this view. Use the view_id field instead.
+ optional bytes view_id_raw = 1 [deprecated = true];
+ // The IP address of the client as seen by Mux servers. Use the ip field instead.
+ // Either 4 or 8 bytes.
+ optional bytes ip_raw = 2 [deprecated = true];
+ // The mask applied to the IP address. If omitted, /24 was used.
+ optional uint32 ip_mask = 3;
+ // A shared Mux/Cedexis customer ID.
+ optional uint64 customer_id = 4;
+ repeated Record records = 5;
+ optional Source source = 6;
+ // A v4 UUID string Mux used to identify this view.
+ optional string view_id = 7;
+ // The IP address string of the client as seen by Mux servers.
+ optional string ip = 8;
+ // Provides ASN to aid in troubleshooting ISP/CDN issues
+ optional int64 asn = 9;
+ // Operating System
+ optional string viewer_os_family = 10;
+ // Operating System Version
+ optional string viewer_os_version = 11;
+ // Unused
+ optional string player_source_stream_type = 12 [deprecated = true];
+ // Player Name
+ optional string player_name = 13;
+ // Device Category (tv, mobile, etc)
+ optional string viewer_device_category = 14;
+ // Has Ads
+ optional bool view_has_ad = 15;
+ // Video Startup Failure
+ optional bool video_startup_failure = 16;
+ optional bool exit_before_video_start = 17;
+ optional string sub_property_id = 18;
+ // Stream Type (VOD/Live)
+ optional string stream_type = 19;
+}
+
+message Record {
+ // Timestamp representing the start time of the sample
+ optional Timestamp start = 1;
+ // Duration of the sample window
+ optional uint32 duration_ms = 2;
+ repeated Metric metrics = 3;
+}
+
+message Source {
+ // The hostname including the protocol used to serve such as:
+ // https://cdn.domain.com
+ optional string hostname = 1;
+ // The IP address that the client resolved, if available.
+ optional bytes ip = 2;
+ // If we are able to identify additional CDN information such as the
+ // X-Served-By, X-Cache or Via headers, it may be included here.
+ optional string host_id = 3;
+}
+
+message Metric {
+ enum Type {
+ UNKNOWN = 0;
+ START_LATENCY_MS = 1;
+ EXIT_BEFORE_VIDEO_START = 2;
+ WATCH_DURATION_MS = 3;
+ SEEK_LATENCY_MS = 4;
+ REBUFFER_DURATION_MS = 5;
+ REBUFFER_COUNT = 6;
+ PLAYBACK_ERROR = 7;
+ TOTAL_BITS = 8; // currently unused
+ }
+ optional Type type = 1;
+ optional int64 value = 2;
+}
From db3f46e499439bb45bbc0211537a8ec231fad71b Mon Sep 17 00:00:00 2001
From: Walker Frankenberg
Date: Fri, 29 Mar 2024 11:50:06 -0700
Subject: [PATCH 2/8] cdn
---
{realtime_samples => monitoring_samples}/README.md | 6 ++++--
.../monitoring_samples.proto | 0
2 files changed, 4 insertions(+), 2 deletions(-)
rename {realtime_samples => monitoring_samples}/README.md (66%)
rename realtime_samples/realtime_samples.proto => monitoring_samples/monitoring_samples.proto (100%)
diff --git a/realtime_samples/README.md b/monitoring_samples/README.md
similarity index 66%
rename from realtime_samples/README.md
rename to monitoring_samples/README.md
index f86a753..83cb83a 100644
--- a/realtime_samples/README.md
+++ b/monitoring_samples/README.md
@@ -4,10 +4,12 @@
-# Mux Data Realtime Samples
+# Mux Data Monitoring Samples
-Mux provides a mechanism for partners to subscribe to realtime video view level datastream of events and measurements related to the quality of service for integrated customers. Realtime Samples are provided with 30 second granularity. This can be used to identify service-level problems, such as widespread rebuffering or playback failures.
+Mux provides a mechanism for partners to subscribe to realtime video view level datastream of events and measurements related to the quality of service for integrated customers. Monitoring Samples are provided with 30 second granularity. This can be used to identify service-level problems, such as widespread rebuffering or playback failures.
The data is delivered in nested Protobuf format. A single stream samples “payload” may contain multiple samples from both time ranges and customer id’s.
Each sample corresponds to a single active video view. The sample can contain multiple records, where each record contains metrics for a point in time for the video view. A record specifies a time period and Metrics measured over that time period. All Metrics inside a single record will apply to the time range implied by the “start” timestamp field plus the “duration_ms” field. If the duration field is zero, the Record includes instantaneous Metrics. A Record MUST contain at least one Metric.
+
+In addition to the information displayed in the monitoring dashboard, Monitoring Samples includes information about the CDN, allowing you to isolate poorly performing groups at the CDN level and steer those accordingly.
diff --git a/realtime_samples/realtime_samples.proto b/monitoring_samples/monitoring_samples.proto
similarity index 100%
rename from realtime_samples/realtime_samples.proto
rename to monitoring_samples/monitoring_samples.proto
From 5f0930b12ce495d4541da18d6e6fc64e673afd2d Mon Sep 17 00:00:00 2001
From: Walker Frankenberg
Date: Fri, 29 Mar 2024 11:56:33 -0700
Subject: [PATCH 3/8] fix wording
---
monitoring_samples/README.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/monitoring_samples/README.md b/monitoring_samples/README.md
index 83cb83a..91daa9e 100644
--- a/monitoring_samples/README.md
+++ b/monitoring_samples/README.md
@@ -6,10 +6,8 @@
# Mux Data Monitoring Samples
-Mux provides a mechanism for partners to subscribe to realtime video view level datastream of events and measurements related to the quality of service for integrated customers. Monitoring Samples are provided with 30 second granularity. This can be used to identify service-level problems, such as widespread rebuffering or playback failures.
+Mux provides a mechanism for partners to subscribe to realtime video view level datastream of events and measurements related to the quality of service for integrated customers. Monitoring Samples are provided with 30 second granularity. This can be used to identify service-level problems, such as widespread rebuffering or playback failures. Monitoring Samples includes information about the CDN, so another common use case is to analyze traffic and perform CDN optimization on poorly performing groups of views.
The data is delivered in nested Protobuf format. A single stream samples “payload” may contain multiple samples from both time ranges and customer id’s.
Each sample corresponds to a single active video view. The sample can contain multiple records, where each record contains metrics for a point in time for the video view. A record specifies a time period and Metrics measured over that time period. All Metrics inside a single record will apply to the time range implied by the “start” timestamp field plus the “duration_ms” field. If the duration field is zero, the Record includes instantaneous Metrics. A Record MUST contain at least one Metric.
-
-In addition to the information displayed in the monitoring dashboard, Monitoring Samples includes information about the CDN, allowing you to isolate poorly performing groups at the CDN level and steer those accordingly.
From 174aa5011da8c208c4c03470d72470d44ad87df5 Mon Sep 17 00:00:00 2001
From: Walker Frankenberg
Date: Fri, 29 Mar 2024 13:03:36 -0700
Subject: [PATCH 4/8] ignore rules
---
buf.yaml | 3 +++
monitoring_samples/monitoring_samples.proto | 8 +++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/buf.yaml b/buf.yaml
index 8c4a662..ab35418 100644
--- a/buf.yaml
+++ b/buf.yaml
@@ -2,3 +2,6 @@ version: v1
lint:
use:
- DEFAULT
+ except:
+ - ENUM_VALUE_PREFIX
+ - ENUM_ZERO_VALUE_SUFFIX
diff --git a/monitoring_samples/monitoring_samples.proto b/monitoring_samples/monitoring_samples.proto
index 811f16d..e6f6bb9 100644
--- a/monitoring_samples/monitoring_samples.proto
+++ b/monitoring_samples/monitoring_samples.proto
@@ -1,11 +1,7 @@
syntax = "proto2";
-package com.mux.realtime;
+package monitoring_samples.v1;
-option go_package = "github.com/muxinc/mux/data/proto/golang/realtime";
-
-// Make our own timestamp, since we are trapped in
-// Protobuf 2.x for the time being.
message Timestamp {
optional int64 seconds = 1;
optional int32 nanos = 2;
@@ -73,7 +69,9 @@ message Source {
}
message Metric {
+ // buf:lint:ignore ENUM_VALUE_PREFIX
enum Type {
+ // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
UNKNOWN = 0;
START_LATENCY_MS = 1;
EXIT_BEFORE_VIDEO_START = 2;
From ac364c477c955f016b85c77d8f00bd124277d87a Mon Sep 17 00:00:00 2001
From: Walker Frankenberg
Date: Fri, 29 Mar 2024 13:04:33 -0700
Subject: [PATCH 5/8] linter
---
monitoring_samples/monitoring_samples.proto | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/monitoring_samples/monitoring_samples.proto b/monitoring_samples/monitoring_samples.proto
index e6f6bb9..0cd4efa 100644
--- a/monitoring_samples/monitoring_samples.proto
+++ b/monitoring_samples/monitoring_samples.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package monitoring_samples.v1;
+package monitoring_samples;
message Timestamp {
optional int64 seconds = 1;
From 0264bb5003ba2fa2066215f5b377a6f518dc74a6 Mon Sep 17 00:00:00 2001
From: Walker Frankenberg
Date: Fri, 29 Mar 2024 13:05:33 -0700
Subject: [PATCH 6/8] final lint
---
monitoring_samples/{ => v1}/monitoring_samples.proto | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename monitoring_samples/{ => v1}/monitoring_samples.proto (98%)
diff --git a/monitoring_samples/monitoring_samples.proto b/monitoring_samples/v1/monitoring_samples.proto
similarity index 98%
rename from monitoring_samples/monitoring_samples.proto
rename to monitoring_samples/v1/monitoring_samples.proto
index 0cd4efa..e6f6bb9 100644
--- a/monitoring_samples/monitoring_samples.proto
+++ b/monitoring_samples/v1/monitoring_samples.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package monitoring_samples;
+package monitoring_samples.v1;
message Timestamp {
optional int64 seconds = 1;
From 62a0faf3ededb01320fb9756eb658cbb53f4f74c Mon Sep 17 00:00:00 2001
From: Walker Frankenberg
Date: Fri, 29 Mar 2024 13:06:58 -0700
Subject: [PATCH 7/8] remove
---
monitoring_samples/v1/monitoring_samples.proto | 2 --
1 file changed, 2 deletions(-)
diff --git a/monitoring_samples/v1/monitoring_samples.proto b/monitoring_samples/v1/monitoring_samples.proto
index e6f6bb9..da5d2c0 100644
--- a/monitoring_samples/v1/monitoring_samples.proto
+++ b/monitoring_samples/v1/monitoring_samples.proto
@@ -69,9 +69,7 @@ message Source {
}
message Metric {
- // buf:lint:ignore ENUM_VALUE_PREFIX
enum Type {
- // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
UNKNOWN = 0;
START_LATENCY_MS = 1;
EXIT_BEFORE_VIDEO_START = 2;
From b54093924cef116483932ef4eb7b11646efd6e0a Mon Sep 17 00:00:00 2001
From: Walker Frankenberg
Date: Tue, 2 Apr 2024 09:37:37 -0700
Subject: [PATCH 8/8] updates
---
monitoring_samples/README.md | 2 +-
monitoring_samples/v1/monitoring_samples.proto | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/monitoring_samples/README.md b/monitoring_samples/README.md
index 91daa9e..8370955 100644
--- a/monitoring_samples/README.md
+++ b/monitoring_samples/README.md
@@ -6,7 +6,7 @@
# Mux Data Monitoring Samples
-Mux provides a mechanism for partners to subscribe to realtime video view level datastream of events and measurements related to the quality of service for integrated customers. Monitoring Samples are provided with 30 second granularity. This can be used to identify service-level problems, such as widespread rebuffering or playback failures. Monitoring Samples includes information about the CDN, so another common use case is to analyze traffic and perform CDN optimization on poorly performing groups of views.
+Mux provides a mechanism for partners to subscribe to real-time video view level datastream of events and measurements related to the quality of service for integrated customers. Monitoring Samples are provided with 30 second granularity. This can be used to identify service-level problems, such as widespread rebuffering or playback failures. Monitoring Samples includes information about the CDN, so another common use case is to analyze traffic and perform CDN optimization on poorly performing groups of views.
The data is delivered in nested Protobuf format. A single stream samples “payload” may contain multiple samples from both time ranges and customer id’s.
diff --git a/monitoring_samples/v1/monitoring_samples.proto b/monitoring_samples/v1/monitoring_samples.proto
index da5d2c0..c3869c2 100644
--- a/monitoring_samples/v1/monitoring_samples.proto
+++ b/monitoring_samples/v1/monitoring_samples.proto
@@ -18,8 +18,7 @@ message Sample {
// Either 4 or 8 bytes.
optional bytes ip_raw = 2 [deprecated = true];
// The mask applied to the IP address. If omitted, /24 was used.
- optional uint32 ip_mask = 3;
- // A shared Mux/Cedexis customer ID.
+ optional uint32 ip_mask = 3 [deprecated = true];
optional uint64 customer_id = 4;
repeated Record records = 5;
optional Source source = 6;