Skip to content

Commit

Permalink
Add internal flag (#27)
Browse files Browse the repository at this point in the history
* SfuSctpChannel samples
 * SfuSctpStream reports
 * SfuTransport reports
  • Loading branch information
balazskreith authored May 8, 2022
1 parent df2484e commit 3b392cf
Show file tree
Hide file tree
Showing 23 changed files with 146 additions and 66 deletions.
3 changes: 3 additions & 0 deletions npm-lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ timestamp (**Mandatory**) | The timestamp when the corresponded data is generate
transportId (**Mandatory**) | The id of the transport the RTP stream uses.
streamId (**Mandatory**) | The id of the sctp stream
marker | The marker the originated sample is reported with
internal | Flag indicate if the sctp channel is used as an internal transport between SFUs
callId | The generated unique identifier of the call
roomId | webrtc app provided room id
label | The label of the sctp stream
Expand Down Expand Up @@ -803,6 +804,7 @@ sfuId (**Mandatory**) | The provided unique identifier of the SFU
timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)
transportId (**Mandatory**) | The generated unique identifier of the transport
marker | The marker the originated sample is reported with
internal | Flag indicate if the sfu transport is used as an internal transport between SFUs
callId | The generated unique identifier of the call
roomId | webrtc app provided room id
dtlsState | Represent the current value of the state attribute of the underlying RTCDtlsTransport.
Expand Down Expand Up @@ -1494,6 +1496,7 @@ transportId (**Mandatory**) | The id of the transport the RTP stream uses.
streamId (**Mandatory**) | The id of the sctp stream
channelId (**Mandatory**) | The id of the sctp stream
noReport | Flag indicate to not generate report from this sample
internal | Flag to indicate that the SCTP channel is used as an internally between SFU instances
label | The label of the sctp stream
protocol | The protocol used to establish an sctp stream
sctpSmoothedRoundTripTime | The latest smoothed round-trip time value, corresponding to spinfo_srtt defined in [RFC6458] but converted to seconds. If there has been no round-trip time measurements yet, this value is undefined.
Expand Down
2 changes: 1 addition & 1 deletion npm-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@observertc/schemas",
"version": "2.0.0",
"version": "2.0.1",
"description": "ObserveRTC Library for Schemas",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion npm-lib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ export { jsonDescriptor as ProtobufSamplesJson } from "./samples/ProtobufSamples
export { schema as ProtobufSamplesV3 } from "./samples/ProtobufSamplesV3";
export { jsonDescriptor as ProtobufSamplesV3Json } from "./samples/ProtobufSamplesV3Json";
export * as W3CStats from "./w3c/W3cStatsIdentifiers";
export const version = "2.0.0";
export const version = "2.0.1";
5 changes: 5 additions & 0 deletions npm-lib/src/reports/SFUTransportReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export type SFUTransportReport = {
*/
marker?: string;

/**
* Flag indicate if the sfu transport is used as an internal transport between SFUs
*/
internal?: boolean;

/**
* The generated unique identifier of the call
*/
Expand Down
9 changes: 9 additions & 0 deletions npm-lib/src/reports/SFUTransportReportAvsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ export const schema = {
"doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)",
"type": "long"
},
{
"name": "internal",
"doc": "Flag indicate if the sfu transport is used as an internal transport between SFUs",
"type": [
"null",
"boolean"
],
"default": null
},
{
"name": "callId",
"doc": "The generated unique identifier of the call",
Expand Down
5 changes: 5 additions & 0 deletions npm-lib/src/reports/SfuSctpStreamReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export type SfuSctpStreamReport = {
*/
marker?: string;

/**
* Flag indicate if the sctp channel is used as an internal transport between SFUs
*/
internal?: boolean;

/**
* The generated unique identifier of the call
*/
Expand Down
9 changes: 9 additions & 0 deletions npm-lib/src/reports/SfuSctpStreamReportAvsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ export const schema = {
"doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)",
"type": "long"
},
{
"name": "internal",
"doc": "Flag indicate if the sctp channel is used as an internal transport between SFUs",
"type": [
"null",
"boolean"
],
"default": null
},
{
"name": "callId",
"doc": "The generated unique identifier of the call",
Expand Down
21 changes: 11 additions & 10 deletions npm-lib/src/samples/ProtobufSamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,16 +576,17 @@ message Samples {
required string transportId = 3;
optional int64 bytesReceived = 4;
optional int64 bytesSent = 5;
optional string label = 6;
optional int32 messageReceived = 7;
optional int32 messageSent = 8;
optional bool noReport = 9;
optional string protocol = 10;
optional double sctpCongestionWindow = 11;
optional int32 sctpMtu = 12;
optional double sctpReceiverWindow = 13;
optional double sctpSmoothedRoundTripTime = 14;
optional int32 sctpUnackData = 15;
optional bool internal = 6;
optional string label = 7;
optional int32 messageReceived = 8;
optional int32 messageSent = 9;
optional bool noReport = 10;
optional string protocol = 11;
optional double sctpCongestionWindow = 12;
optional int32 sctpMtu = 13;
optional double sctpReceiverWindow = 14;
optional double sctpSmoothedRoundTripTime = 15;
optional int32 sctpUnackData = 16;
}
message SfuExtensionStats {
required string payload = 1;
Expand Down
24 changes: 14 additions & 10 deletions npm-lib/src/samples/ProtobufSamplesJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2313,45 +2313,49 @@ export const jsonDescriptor = {
"type": "int64",
"id": 5
},
"internal": {
"type": "bool",
"id": 6
},
"label": {
"type": "string",
"id": 6
"id": 7
},
"messageReceived": {
"type": "int32",
"id": 7
"id": 8
},
"messageSent": {
"type": "int32",
"id": 8
"id": 9
},
"noReport": {
"type": "bool",
"id": 9
"id": 10
},
"protocol": {
"type": "string",
"id": 10
"id": 11
},
"sctpCongestionWindow": {
"type": "double",
"id": 11
"id": 12
},
"sctpMtu": {
"type": "int32",
"id": 12
"id": 13
},
"sctpReceiverWindow": {
"type": "double",
"id": 13
"id": 14
},
"sctpSmoothedRoundTripTime": {
"type": "double",
"id": 14
"id": 15
},
"sctpUnackData": {
"type": "int32",
"id": 15
"id": 16
}
}
},
Expand Down
21 changes: 11 additions & 10 deletions npm-lib/src/samples/ProtobufSamplesV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,16 +576,17 @@ message Samples {
string transportId = 3;
int64 bytesReceived = 4;
int64 bytesSent = 5;
string label = 6;
int32 messageReceived = 7;
int32 messageSent = 8;
bool noReport = 9;
string protocol = 10;
double sctpCongestionWindow = 11;
int32 sctpMtu = 12;
double sctpReceiverWindow = 13;
double sctpSmoothedRoundTripTime = 14;
int32 sctpUnackData = 15;
bool internal = 6;
string label = 7;
int32 messageReceived = 8;
int32 messageSent = 9;
bool noReport = 10;
string protocol = 11;
double sctpCongestionWindow = 12;
int32 sctpMtu = 13;
double sctpReceiverWindow = 14;
double sctpSmoothedRoundTripTime = 15;
int32 sctpUnackData = 16;
}
message SfuExtensionStats {
string payload = 1;
Expand Down
24 changes: 14 additions & 10 deletions npm-lib/src/samples/ProtobufSamplesV3Json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2289,45 +2289,49 @@ export const jsonDescriptor = {
"type": "int64",
"id": 5
},
"internal": {
"type": "bool",
"id": 6
},
"label": {
"type": "string",
"id": 6
"id": 7
},
"messageReceived": {
"type": "int32",
"id": 7
"id": 8
},
"messageSent": {
"type": "int32",
"id": 8
"id": 9
},
"noReport": {
"type": "bool",
"id": 9
"id": 10
},
"protocol": {
"type": "string",
"id": 10
"id": 11
},
"sctpCongestionWindow": {
"type": "double",
"id": 11
"id": 12
},
"sctpMtu": {
"type": "int32",
"id": 12
"id": 13
},
"sctpReceiverWindow": {
"type": "double",
"id": 13
"id": 14
},
"sctpSmoothedRoundTripTime": {
"type": "double",
"id": 14
"id": 15
},
"sctpUnackData": {
"type": "int32",
"id": 15
"id": 16
}
}
},
Expand Down
5 changes: 5 additions & 0 deletions npm-lib/src/samples/Samples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ export type SfuSctpChannel = {
*/
noReport?: boolean;

/**
* Flag to indicate that the SCTP channel is used as an internally between SFU instances
*/
internal?: boolean;

/**
* The label of the sctp stream
*/
Expand Down
9 changes: 9 additions & 0 deletions npm-lib/src/samples/SamplesAvsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4977,6 +4977,15 @@ export const schema = {
"doc": "The id of the sctp stream",
"type": "string"
},
{
"name": "internal",
"doc": "Flag to indicate that the SCTP channel is used as an internally between SFU instances",
"type": [
"null",
"boolean"
],
"default": null
},
{
"name": "label",
"doc": "The label of the sctp stream",
Expand Down
21 changes: 11 additions & 10 deletions npm-monitor-lib/SamplesProtobuf.proto
Original file line number Diff line number Diff line change
Expand Up @@ -575,16 +575,17 @@ message Samples {
required string transportId = 3;
optional int64 bytesReceived = 4;
optional int64 bytesSent = 5;
optional string label = 6;
optional int32 messageReceived = 7;
optional int32 messageSent = 8;
optional bool noReport = 9;
optional string protocol = 10;
optional double sctpCongestionWindow = 11;
optional int32 sctpMtu = 12;
optional double sctpReceiverWindow = 13;
optional double sctpSmoothedRoundTripTime = 14;
optional int32 sctpUnackData = 15;
optional bool internal = 6;
optional string label = 7;
optional int32 messageReceived = 8;
optional int32 messageSent = 9;
optional bool noReport = 10;
optional string protocol = 11;
optional double sctpCongestionWindow = 12;
optional int32 sctpMtu = 13;
optional double sctpReceiverWindow = 14;
optional double sctpSmoothedRoundTripTime = 15;
optional int32 sctpUnackData = 16;
}
message SfuExtensionStats {
required string payload = 1;
Expand Down
2 changes: 1 addition & 1 deletion npm-monitor-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@observertc/monitor-schemas",
"version": "2.0.0",
"version": "2.0.1",
"description": "ObserveRTC Library for Schemas",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion npm-monitor-lib/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from "./samples/Samples";
export { schema as ProtobufSamples } from "./samples/ProtobufSamples";
export * as W3CStats from "./w3c/W3cStatsIdentifiers";
export const version = "2.0.0";
export const version = "2.0.1";
21 changes: 11 additions & 10 deletions npm-monitor-lib/src/samples/ProtobufSamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,16 +576,17 @@ message Samples {
required string transportId = 3;
optional int64 bytesReceived = 4;
optional int64 bytesSent = 5;
optional string label = 6;
optional int32 messageReceived = 7;
optional int32 messageSent = 8;
optional bool noReport = 9;
optional string protocol = 10;
optional double sctpCongestionWindow = 11;
optional int32 sctpMtu = 12;
optional double sctpReceiverWindow = 13;
optional double sctpSmoothedRoundTripTime = 14;
optional int32 sctpUnackData = 15;
optional bool internal = 6;
optional string label = 7;
optional int32 messageReceived = 8;
optional int32 messageSent = 9;
optional bool noReport = 10;
optional string protocol = 11;
optional double sctpCongestionWindow = 12;
optional int32 sctpMtu = 13;
optional double sctpReceiverWindow = 14;
optional double sctpSmoothedRoundTripTime = 15;
optional int32 sctpUnackData = 16;
}
message SfuExtensionStats {
required string payload = 1;
Expand Down
5 changes: 5 additions & 0 deletions npm-monitor-lib/src/samples/Samples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ export type SfuSctpChannel = {
*/
noReport?: boolean;

/**
* Flag to indicate that the SCTP channel is used as an internally between SFU instances
*/
internal?: boolean;

/**
* The label of the sctp stream
*/
Expand Down
Loading

0 comments on commit 3b392cf

Please sign in to comment.