Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
files="(JsonConverter|Values|ConnectHeaders).java"/>

<suppress checks="JavaNCSS"
files="(KafkaConfigBackingStore|Values).java"/>
files="(KafkaConfigBackingStore|Values|ConnectMetricsRegistry).java"/>

<suppress checks="NPathComplexity"
files="(DistributedHerder|RestClient|RestServer|JsonConverter|KafkaConfigBackingStore|FileStreamSourceTask|TopicAdmin).java"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ public class ConnectMetricsRegistry {
public final MetricNameTemplate dlqProduceRequests;
public final MetricNameTemplate dlqProduceFailures;
public final MetricNameTemplate lastErrorTimestamp;
public final MetricNameTemplate transactionSizeMin;
public final MetricNameTemplate transactionSizeMax;
public final MetricNameTemplate transactionSizeAvg;

public Map<MetricNameTemplate, TaskStatus.State> connectorStatusMetrics;

Expand Down Expand Up @@ -207,6 +210,16 @@ public ConnectMetricsRegistry(Set<String> tags) {
"completely written to Kafka.",
sourceTaskTags);

transactionSizeMin = createTemplate("transaction-size-min", SOURCE_TASK_GROUP_NAME,
"The number of records in the smallest transaction the task has committed so far. ",
sourceTaskTags);
transactionSizeMax = createTemplate("transaction-size-max", SOURCE_TASK_GROUP_NAME,
"The number of records in the largest transaction the task has committed so far.",
sourceTaskTags);
transactionSizeAvg = createTemplate("transaction-size-avg", SOURCE_TASK_GROUP_NAME,
"The average number of records in the transactions the task has committed so far.",
sourceTaskTags);

/***** Sink worker task level *****/
Set<String> sinkTaskTags = new LinkedHashSet<>(tags);
sinkTaskTags.add(CONNECTOR_TAG_NAME);
Expand Down