Class StandaloneCanaryAnalysisController


  • @RestController("Standalone Canary Analysis Controller - endpoints for performing multiple canary judgements over a period of time, past or present")
    @RequestMapping("/standalone_canary_analysis")
    public class StandaloneCanaryAnalysisController
    extends java.lang.Object
    Controller for triggering logic that is representative of what happens in the Spinnaker Canary Analysis StageExecution of a pipeline.
    • Constructor Detail

      • StandaloneCanaryAnalysisController

        @Autowired
        public StandaloneCanaryAnalysisController​(com.netflix.kayenta.security.AccountCredentialsRepository accountCredentialsRepository,
                                                  CanaryAnalysisService canaryAnalysisService,
                                                  com.netflix.kayenta.storage.StorageServiceRepository storageServiceRepository)
    • Method Detail

      • initiateCanaryAnalysis

        @RequestMapping(value="/{canaryConfigId:.+}",
                        consumes="application/json",
                        method=POST)
        public CanaryAnalysisExecutionResponse initiateCanaryAnalysis​(@RequestParam(required=false)
                                                                      java.lang.String user,
                                                                      @RequestParam(required=false)
                                                                      java.lang.String application,
                                                                      @RequestParam(required=false)
                                                                      java.lang.String parentPipelineExecutionId,
                                                                      @RequestParam(required=false)
                                                                      java.lang.String metricsAccountName,
                                                                      @RequestParam(required=false)
                                                                      java.lang.String configurationAccountName,
                                                                      @RequestParam(required=false)
                                                                      java.lang.String storageAccountName,
                                                                      @RequestBody
                                                                      CanaryAnalysisExecutionRequest canaryAnalysisExecutionRequest,
                                                                      @PathVariable
                                                                      java.lang.String canaryConfigId)
        Initiate a Canary Analysis Execution using a stored canary configuration.
        Parameters:
        user - The initiating user
        application - The application under test
        parentPipelineExecutionId - The parent pipeline execution id, if this is being executed as a StageExecution in another pipeline
        metricsAccountName - The account that has the metrics for the application under test
        configurationAccountName - The account that has the supplied canary config id
        storageAccountName - The account that will be used to store results
        canaryAnalysisExecutionRequest - The canary analysis execution request that configures how the analysis will be performed
        canaryConfigId - The id for the canary configuration to use for the analysis execution
        Returns:
        Object with the execution id
      • initiateCanaryAnalysisExecutionWithConfig

        @RequestMapping(consumes="application/json",
                        method=POST)
        public CanaryAnalysisExecutionResponse initiateCanaryAnalysisExecutionWithConfig​(@RequestParam(required=false)
                                                                                         java.lang.String user,
                                                                                         @RequestParam(required=false)
                                                                                         java.lang.String application,
                                                                                         @RequestParam(required=false)
                                                                                         java.lang.String parentPipelineExecutionId,
                                                                                         @RequestParam(required=false)
                                                                                         java.lang.String metricsAccountName,
                                                                                         @RequestParam(required=false)
                                                                                         java.lang.String storageAccountName,
                                                                                         @RequestBody
                                                                                         CanaryAnalysisAdhocExecutionRequest canaryAnalysisAdhocExecutionRequest)
        Initiates a Canary Analysis Execution with the provided canary configuration.
        Parameters:
        user - The initiating user
        application - The application under test
        parentPipelineExecutionId - The parent pipeline execution id, if this is being executed as a StageExecution in another pipeline
        metricsAccountName - The account that has the metrics for the application under test
        storageAccountName - The account that will be used to store results
        canaryAnalysisAdhocExecutionRequest - Wrapper around the canary analysis execution request that configures how the analysis will be performed and the canary config
        Returns:
        Object with the execution id
      • getCanaryAnalysisExecution

        @RequestMapping(value="/{canaryAnalysisExecutionId:.+}",
                        method=GET)
        public CanaryAnalysisExecutionStatusResponse getCanaryAnalysisExecution​(@PathVariable
                                                                                java.lang.String canaryAnalysisExecutionId,
                                                                                @RequestParam(required=false)
                                                                                java.lang.String storageAccountName)
        Fetches a Canary Analysis Execution from a supplied id.
        Parameters:
        canaryAnalysisExecutionId - The id for the Canary Analysis Execution
        Returns:
        The canary analysis execution object that will have the results and status.