Class StandaloneCanaryAnalysisController

java.lang.Object
com.netflix.kayenta.standalonecanaryanalysis.controller.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 Object
Controller for triggering logic that is representative of what happens in the Spinnaker Canary Analysis StageExecution of a pipeline.
  • Constructor Details

    • StandaloneCanaryAnalysisController

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

    • initiateCanaryAnalysis

      @RequestMapping(value="/{canaryConfigId:.+}", consumes="application/json", method=POST) public CanaryAnalysisExecutionResponse initiateCanaryAnalysis(@RequestParam(required=false) String user, @RequestParam(required=false) String application, @RequestParam(required=false) String parentPipelineExecutionId, @RequestParam(required=false) String metricsAccountName, @RequestParam(required=false) String configurationAccountName, @RequestParam(required=false) String storageAccountName, @RequestBody CanaryAnalysisExecutionRequest canaryAnalysisExecutionRequest, @PathVariable 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) String user, @RequestParam(required=false) String application, @RequestParam(required=false) String parentPipelineExecutionId, @RequestParam(required=false) String metricsAccountName, @RequestParam(required=false) 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 String canaryAnalysisExecutionId, @RequestParam(required=false) 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.