diff --git a/kayenta-standalone-canary-analysis/src/main/java/com/netflix/kayenta/standalonecanaryanalysis/domain/CanaryAnalysisExecutionRequestScope.java b/kayenta-standalone-canary-analysis/src/main/java/com/netflix/kayenta/standalonecanaryanalysis/domain/CanaryAnalysisExecutionRequestScope.java index c3d4373b3..2e7952fe7 100644 --- a/kayenta-standalone-canary-analysis/src/main/java/com/netflix/kayenta/standalonecanaryanalysis/domain/CanaryAnalysisExecutionRequestScope.java +++ b/kayenta-standalone-canary-analysis/src/main/java/com/netflix/kayenta/standalonecanaryanalysis/domain/CanaryAnalysisExecutionRequestScope.java @@ -56,6 +56,14 @@ public class CanaryAnalysisExecutionRequestScope { example = "us-west-2") String controlLocation; + @ApiModelProperty( + value = + "The time offset (in minutes) to apply to the control scope. If none is provided, the control is " + + "evaluated at the same time as the experiment.", + example = "10") + @Builder.Default + Long controlOffset = 0L; + @ApiModelProperty( value = "This value is used to fetch the data for the experiment from the metrics service. " diff --git a/kayenta-standalone-canary-analysis/src/main/java/com/netflix/kayenta/standalonecanaryanalysis/orca/stage/SetupAndExecuteCanariesStage.java b/kayenta-standalone-canary-analysis/src/main/java/com/netflix/kayenta/standalonecanaryanalysis/orca/stage/SetupAndExecuteCanariesStage.java index be0783783..d43aa8bc1 100644 --- a/kayenta-standalone-canary-analysis/src/main/java/com/netflix/kayenta/standalonecanaryanalysis/orca/stage/SetupAndExecuteCanariesStage.java +++ b/kayenta-standalone-canary-analysis/src/main/java/com/netflix/kayenta/standalonecanaryanalysis/orca/stage/SetupAndExecuteCanariesStage.java @@ -226,7 +226,7 @@ protected Map buildRequestScopes( new CanaryScope( scope.getControlScope(), scope.getControlLocation(), - scopeTimeConfig.start, + scopeTimeConfig.start.minus(Duration.ofMinutes(scope.getControlOffset())), scopeTimeConfig.end, config.getStep().getSeconds(), scope.getExtendedScopeParams());