This commit is contained in:
Kris O'Mealy 2024-06-12 20:44:52 +00:00 committed by GitHub
commit dc708cab0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -298,6 +298,13 @@ func (cw *MonitoringService) MillisBehindLatest(shard string, millSeconds float6
m.behindLatestMillis = append(m.behindLatestMillis, millSeconds)
}
func (cw *MonitoringService) DeleteMetricMillisBehindLatest(shard string) {
m := cw.getOrCreatePerShardMetrics(shard)
m.Lock()
defer m.Unlock()
m.behindLatestMillis = []float64{}
}
func (cw *MonitoringService) LeaseGained(shard string) {
m := cw.getOrCreatePerShardMetrics(shard)
m.Lock()

View file

@ -338,7 +338,8 @@ func getMetricsConfig(kclConfig *cfg.KinesisClientLibConfiguration, service stri
return cloudwatch.NewMonitoringServiceWithOptions(kclConfig.RegionName,
kclConfig.KinesisCredentials,
kclConfig.Logger,
cloudwatch.DefaultCloudwatchMetricsBufferDuration)
cloudwatch.DefaultCloudwatchMetricsBufferDuration,
)
}
if service == "prometheus" {