suneet-s commented on code in PR #12730: URL: https://github.com/apache/druid/pull/12730#discussion_r915893511
########## server/src/main/java/org/apache/druid/server/metrics/HistoricalAdvancedSegmentMonitor.java: ########## @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + +package org.apache.druid.server.metrics; + + +import com.google.inject.Inject; +import org.apache.druid.client.DruidServerConfig; +import org.apache.druid.java.util.emitter.service.ServiceEmitter; +import org.apache.druid.java.util.emitter.service.ServiceEventBuilder; +import org.apache.druid.java.util.emitter.service.ServiceMetricEvent; +import org.apache.druid.java.util.metrics.AbstractMonitor; +import org.apache.druid.query.DruidMetrics; +import org.apache.druid.server.coordination.SegmentLoadDropHandler; + +import java.util.Map; + +public class HistoricalAdvancedSegmentMonitor extends AbstractMonitor Review Comment: javadocs please ########## docs/configuration/index.md: ########## @@ -380,6 +380,7 @@ Metric monitoring is an essential part of Druid operations. The following monit |`org.apache.druid.java.util.metrics.CgroupMemoryMonitor`|Reports memory statistic as per the memory cgroup.| |`org.apache.druid.server.metrics.EventReceiverFirehoseMonitor`|Reports how many events have been queued in the EventReceiverFirehose.| |`org.apache.druid.server.metrics.HistoricalMetricsMonitor`|Reports statistics on Historical processes. Available only on Historical processes.| +| `org.apache.druid.server.metrics.HistoricalAdvancedSegmentMonitor` | **EXPERIMENTAL** Reports statistics about segments on Historical processes. Available only on Historical processes. Not to be used when lazy loading is configured. | Review Comment: ```suggestion | `org.apache.druid.server.metrics.SegmentStatsMonitor` | **EXPERIMENTAL** Reports statistics about segments on Historical processes. Available only on Historical processes. Not to be used when lazy loading is configured. | ``` ########## docs/operations/metrics.md: ########## @@ -323,6 +323,8 @@ decisions. |`segment/usedPercent`|Percentage of space used by served segments.|dataSource, tier, priority.|< 100%| |`segment/count`|Number of served segments.|dataSource, tier, priority.|Varies.| |`segment/pendingDelete`|On-disk size in bytes of segments that are waiting to be cleared out|Varies.| +| `segment/averageRowCount` | The average number of rows per segment on a historical. | dataSource, tier, priority. | ~5 million | Review Comment: Please add a note for these 2 metrics that they are emitted only when the `SegmentStatsMonitor` is enabled -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
