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
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ public class MetricNames {

// for log tablet
public static final String LOG_NUM_SEGMENTS = "numSegments";
public static final String LOG_START_OFFSET = "startOffset";
public static final String LOG_END_OFFSET = "endOffset";
public static final String REMOTE_LOG_SIZE = "size";
public static final String LOG_LAKE_TIMESTAMP_LAG = "timestampLag";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ public void registerMetrics(BucketMetricGroup bucketMetricGroup) {
MetricGroup metricGroup = bucketMetricGroup.addGroup("log");
metricGroup.gauge(
MetricNames.LOG_NUM_SEGMENTS, () -> localLog.getSegments().numberOfSegments());
metricGroup.gauge(MetricNames.LOG_START_OFFSET, localLog::getLocalLogStartOffset);
metricGroup.gauge(MetricNames.LOG_END_OFFSET, localLog::getLocalLogEndOffset);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ public void registerMetrics(BucketMetricGroup bucketMetricGroup) {
}
MetricGroup metricGroup = bucketMetricGroup.addGroup("remoteLog");
metricGroup.gauge(MetricNames.LOG_NUM_SEGMENTS, () -> numRemoteLogSegments);
metricGroup.gauge(
MetricNames.LOG_START_OFFSET,
() -> {
if (remoteLogStartOffset == INIT_REMOTE_LOG_START_OFFSET) {
return -1L;
}
return remoteLogStartOffset;
});
metricGroup.gauge(MetricNames.LOG_END_OFFSET, () -> remoteLogEndOffset);
metricGroup.gauge(MetricNames.REMOTE_LOG_SIZE, this::getRemoteSizeInBytes);
remoteLogMetrics = metricGroup;
Expand Down
10 changes: 10 additions & 0 deletions website/docs/maintenance/observability/monitor-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,11 @@ Some metrics might not be exposed when using other JVM implementations (e.g. IBM
<td>numSegments</td>
<td>The number of segments in local storage for this table bucket.</td>
<td>Gauge</td>
</tr>
<tr>
<td>startOffset</td>
<td>The start offset in local storage for this table bucket.</td>
<td>Gauge</td>
</tr>
<tr>
<td>endOffset</td>
Expand All @@ -873,6 +878,11 @@ Some metrics might not be exposed when using other JVM implementations (e.g. IBM
<td>numSegments</td>
<td>The number of segments in remote storage for this table bucket.</td>
<td>Gauge</td>
</tr>
<tr>
<td>startOffset</td>
<td>The start offset in remote storage for this table bucket.</td>
<td>Gauge</td>
</tr>
<tr>
<td>endOffset</td>
Expand Down