Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ public void commitRecord(SourceRecord record, RecordMetadata metadata) {
}
TopicPartition topicPartition = new TopicPartition(record.topic(), record.kafkaPartition());
long correctedTimestamp = record.timestamp();
long currentTimeMillis = System.currentTimeMillis();
Header eventProxiedTimeHeader = (Header) record.headers().lastWithName("eventProxiedTime"); // TODO: change to standardized header name when available
if (eventProxiedTimeHeader != null) {
String headerString = new String(eventProxiedTimeHeader.value(), StandardCharsets.UTF_8);
Expand All @@ -187,7 +188,7 @@ public void commitRecord(SourceRecord record, RecordMetadata metadata) {
log.error("Error parsing eventProxiedTime header value '{}' -- using record timestamp instead.", headerString, e);
}
}
long latency = System.currentTimeMillis() - correctedTimestamp;
long latency = currentTimeMillis - correctedTimestamp;
metrics.countRecord(topicPartition);
metrics.replicationLatency(topicPartition, latency);
// Queue offset syncs only when offsetWriter is available
Expand Down