feat: Sends the statisticsDisplayName to rtcstats.

This commit is contained in:
George Politis 2023-03-02 11:23:19 +00:00
parent e5681382b0
commit a7193fb248
1 changed files with 9 additions and 5 deletions

View File

@ -68,11 +68,15 @@ export function connectAndSendIdentity({ getState, dispatch }: IStore, identity:
// This is done in order to facilitate queries based on different conference configurations. // This is done in order to facilitate queries based on different conference configurations.
// e.g. Find all RTCPeerConnections that connect to a specific shard or were created in a // e.g. Find all RTCPeerConnections that connect to a specific shard or were created in a
// conference with a specific version. // conference with a specific version.
// XXX(george): we also want to be able to correlate between rtcstats and callstats, so we're let displayName = jitsiLocalStorage.getItem('callStatsUserName');
// appending the callstats user name (if it exists) to the display name.
const displayName = options.statisticsId if (options.statisticsId || options.statisticsDisplayName) {
|| options.statisticsDisplayName if (options.statisticsId && options.statisticsDisplayName) {
|| jitsiLocalStorage.getItem('callStatsUserName'); displayName = `${options.statisticsDisplayName} (${options.statisticsId})`;
} else {
displayName = options.statisticsId || options.statisticsDisplayName;
}
}
RTCStats.sendIdentityData({ RTCStats.sendIdentityData({
...getAmplitudeIdentity(), ...getAmplitudeIdentity(),