File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
openfeature-provider-local/src/main/java/com/spotify/confidence Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1515public class GrpcWasmFlagLogger implements WasmFlagLogger {
1616 private static final String CONFIDENCE_DOMAIN = "edge-grpc.spotify.com" ;
1717 private static final Logger logger = LoggerFactory .getLogger (GrpcWasmFlagLogger .class );
18- private final InternalFlagLoggerServiceGrpc .InternalFlagLoggerServiceFutureStub stub ;
18+ private final InternalFlagLoggerServiceGrpc .InternalFlagLoggerServiceBlockingStub stub ;
1919
2020 public GrpcWasmFlagLogger (ApiSecret apiSecret ) {
2121 final var channel = createConfidenceChannel ();
@@ -26,11 +26,15 @@ public GrpcWasmFlagLogger(ApiSecret apiSecret) {
2626 final TokenHolder .Token token = tokenHolder .getToken ();
2727 final Channel authenticatedChannel =
2828 ClientInterceptors .intercept (channel , new JwtAuthClientInterceptor (tokenHolder ));
29- this .stub = InternalFlagLoggerServiceGrpc .newFutureStub (authenticatedChannel );
29+ this .stub = InternalFlagLoggerServiceGrpc .newBlockingStub (authenticatedChannel );
3030 }
3131
3232 @ Override
3333 public void write (WriteFlagLogsRequest request ) {
34+ if (request .getClientResolveInfoList ().isEmpty () && request .getFlagAssignedList ().isEmpty ()) {
35+ logger .debug ("Skipping empty flag log request" );
36+ return ;
37+ }
3438 final var ignore = stub .writeFlagLogs (request );
3539 }
3640
You can’t perform that action at this time.
0 commit comments