diff --git a/src/main/java/com/vinted/flink/bigquery/sink/async/AsyncBigQuerySinkWriter.java b/src/main/java/com/vinted/flink/bigquery/sink/async/AsyncBigQuerySinkWriter.java index 96ec2ec..5032e4a 100644 --- a/src/main/java/com/vinted/flink/bigquery/sink/async/AsyncBigQuerySinkWriter.java +++ b/src/main/java/com/vinted/flink/bigquery/sink/async/AsyncBigQuerySinkWriter.java @@ -108,8 +108,8 @@ protected final void recreateStreamWriter(String traceId, String streamName, Str @Override protected void submitRequestEntries(List list, Consumer> consumer) { - var traceId = UUID.randomUUID().toString(); var requests = list.stream().map(request -> { + var traceId = UUID.randomUUID().toString(); registerAppendMetrics(request); var writer = streamWriter(traceId, request.getStream(), request.getTable()); logger.trace("Trace-id {}, Writing rows stream {} to steamWriter for {} writer id {}", traceId, request.getStream(), writer.getStreamName(), writer.getWriterId());