Skip to content

Commit

Permalink
Atlas CloudWatch: Normalize incoming timestamps to the minute instad …
Browse files Browse the repository at this point in the history
…of the (#428)

period. When some configs are set to 5m but the data is actually streamed every
5, the values overwrite and post incorrectly.
  • Loading branch information
manolama authored Mar 28, 2023
1 parent 42974a3 commit 267e655
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ abstract class CloudWatchMetricsProcessor(

val filtered =
new util.LinkedList[CloudWatchValue](data.asScala.filter(_.getTimestamp >= oldest).asJava)
val ts = normalize(datapoint.datapoint.timestamp().toEpochMilli, category.period)
val ts = normalize(datapoint.datapoint.timestamp().toEpochMilli, 60)
if (ts < oldest) {
registry.counter(droppedOld.withTag("aws.namespace", category.namespace)).increment()
debugger.debugIncoming(datapoint, IncomingMatch.DroppedOld, receivedTimestamp, Some(category))
Expand Down

0 comments on commit 267e655

Please sign in to comment.