chore: create DeleteMetricMillisBehindLatest to satisfy worker_test implementation error (#3)
Signed-off-by: Kris O'Mealy <komealy@hotmail.com>
This commit is contained in:
parent
b12921da23
commit
877c716d3d
2 changed files with 9 additions and 1 deletions
|
|
@ -298,6 +298,13 @@ func (cw *MonitoringService) MillisBehindLatest(shard string, millSeconds float6
|
||||||
m.behindLatestMillis = append(m.behindLatestMillis, millSeconds)
|
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) {
|
func (cw *MonitoringService) LeaseGained(shard string) {
|
||||||
m := cw.getOrCreatePerShardMetrics(shard)
|
m := cw.getOrCreatePerShardMetrics(shard)
|
||||||
m.Lock()
|
m.Lock()
|
||||||
|
|
|
||||||
|
|
@ -338,7 +338,8 @@ func getMetricsConfig(kclConfig *cfg.KinesisClientLibConfiguration, service stri
|
||||||
return cloudwatch.NewMonitoringServiceWithOptions(kclConfig.RegionName,
|
return cloudwatch.NewMonitoringServiceWithOptions(kclConfig.RegionName,
|
||||||
kclConfig.KinesisCredentials,
|
kclConfig.KinesisCredentials,
|
||||||
kclConfig.Logger,
|
kclConfig.Logger,
|
||||||
cloudwatch.DefaultCloudwatchMetricsBufferDuration)
|
cloudwatch.DefaultCloudwatchMetricsBufferDuration,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if service == "prometheus" {
|
if service == "prometheus" {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue