File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -587,6 +587,13 @@ class Metrics extends Utility implements MetricsInterface {
587587 * @param timestamp - The timestamp to set, which can be a number or a Date object.
588588 */
589589 public setTimestamp ( timestamp : number | Date ) : void {
590+ /**
591+ * The timestamp must be a Date object or an integer representing an epoch time.
592+ * This should not exceed 14 days in the past or be more than 2 hours in the future.
593+ * Any metrics failing to meet this criteria will be skipped by Amazon CloudWatch.
594+ * See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Specification.html
595+ * See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Monitoring-CloudWatch-Metrics.html
596+ **/
590597 if ( ! this . #validateEmfTimestamp( timestamp ) ) {
591598 this . #logger. warn (
592599 "This metric doesn't meet the requirements and will be skipped by Amazon CloudWatch. " +
You can’t perform that action at this time.
0 commit comments