Skip to content

Commit

Permalink
remove lastupdateTimestamp for offset metric
Browse files Browse the repository at this point in the history
  • Loading branch information
cserwen committed May 17, 2022
1 parent 8bc34bc commit 4269107
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,20 +315,19 @@ private void collectConsumerMetric(List<MetricFamilySamples> mfs) {


private static final List<String> TOPIC_OFFSET_LABEL_NAMES = Arrays.asList(
"cluster", "broker", "topic", "lastUpdateTimestamp"
"cluster", "broker", "topic"
);

private static final List<String> DLQ_TOPIC_OFFSET_LABEL_NAMES = Arrays.asList(
"cluster", "broker", "group", "lastUpdateTimestamp"
"cluster", "broker", "group"
);

private void loadTopicOffsetMetric(GaugeMetricFamily family, Map.Entry<ProducerMetric, Double> entry) {
family.addMetric(
Arrays.asList(
entry.getKey().getClusterName(),
entry.getKey().getBrokerName(),
entry.getKey().getTopicName(),
String.valueOf(entry.getKey().getLastUpdateTimestamp())
entry.getKey().getTopicName()
),
entry.getValue());
}
Expand All @@ -352,8 +351,7 @@ private void collectTopicOffsetMetric(List<MetricFamilySamples> mfs) {
Arrays.asList(
entry.getKey().getClusterName(),
entry.getKey().getBrokerName(),
entry.getKey().getGroup(),
String.valueOf(entry.getKey().getLastUpdateTimestamp())
entry.getKey().getGroup()
),
entry.getValue());
}
Expand Down

0 comments on commit 4269107

Please sign in to comment.