diff --git a/clientlibrary/metrics/cloudwatch/cloudwatch.go b/clientlibrary/metrics/cloudwatch/cloudwatch.go index 7fb66b3..973a733 100644 --- a/clientlibrary/metrics/cloudwatch/cloudwatch.go +++ b/clientlibrary/metrics/cloudwatch/cloudwatch.go @@ -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() diff --git a/test/worker_test.go b/test/worker_test.go index 5a87241..50dfcfd 100644 --- a/test/worker_test.go +++ b/test/worker_test.go @@ -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" {