Include optional call ID hashes in call quality survey responses

This commit is contained in:
Jon Chambers authored and GitHub committed 2026-05-27 15:31:53 -04:00
1 parent d4581931ff
commit f10cc26144
4 files changed
+17

No files matched your search

@@ -138,6 +138,10 @@ public class CallQualitySurveyManager {
pubSubMessageBuilder.setCallTelemetry(submitCallQualitySurveyRequest.getCallTelemetry());
}
if (submitCallQualitySurveyRequest.hasCallIdHash()) {
pubSubMessageBuilder.setCallIdHash(submitCallQualitySurveyRequest.getCallIdHash());
}
GoogleApiUtil.toCompletableFuture(pubSubPublisher.publish(PubsubMessage.newBuilder()
.setData(pubSubMessageBuilder.build().toByteString())
.build()), pubSubCallbackExecutor)
@@ -125,4 +125,9 @@ message CallQualitySurveyResponsePubSubMessage {
// call; this is a serialized protobuf entity generated (and, critically,
// explained to the user!) by the calling library
optional bytes call_telemetry = 27;
// A hash of a call ID (shared between clients and never sent to the calling
// server) that can be used to correlate survey responses from multiple
// participants in a call
optional bytes call_id_hash = 28;
}
@@ -104,6 +104,11 @@ message SubmitCallQualitySurveyRequest {
// entity generated (and, critically, explained to the user!) by the calling
// library
optional bytes call_telemetry = 21;
// A hash of a call ID (shared between clients and never sent to the calling
// server) that can be used to correlate survey responses from multiple
// participants in a call
optional bytes call_id_hash = 22;
}
message SubmitCallQualitySurveyResponse {
@@ -67,6 +67,7 @@ class CallQualitySurveyManagerTest {
final String asnRegion = "US";
final byte[] telemetryBytes = TestRandomUtil.nextBytes(32);
final byte[] callIdHashBytes = TestRandomUtil.nextBytes(16);
final float connectionRttMedian = ThreadLocalRandom.current().nextFloat();
final float audioRttMedian = ThreadLocalRandom.current().nextFloat();
@@ -105,6 +106,7 @@ class CallQualitySurveyManagerTest {
.setAudioSendPacketLossFraction(audioSendPacketLossFraction)
.setVideoSendPacketLossFraction(videoSendPacketLossFraction)
.setCallTelemetry(ByteString.copyFrom(telemetryBytes))
.setCallIdHash(ByteString.copyFrom(callIdHashBytes))
.build();
//noinspection unchecked
@@ -145,6 +147,7 @@ class CallQualitySurveyManagerTest {
assertEquals(audioSendPacketLossFraction, callQualitySurveyResponsePubSubMessage.getAudioSendPacketLossFraction());
assertEquals(videoSendPacketLossFraction, callQualitySurveyResponsePubSubMessage.getVideoSendPacketLossFraction());
assertArrayEquals(telemetryBytes, callQualitySurveyResponsePubSubMessage.getCallTelemetry().toByteArray());
assertArrayEquals(callIdHashBytes, callQualitySurveyResponsePubSubMessage.getCallIdHash().toByteArray());
}
@ParameterizedTest