CloudWatch

Added in: v2.0.0-28

Enable CloudWatch (opens in a new tab) by adding a configuration with type: cloudwatch and setting the AWS region that you want metrics to be sent to:

config:
  plugins:
    publish-metrics:
      - type: cloudwatch
        region: eu-west-1

By default, all Artillery metrics will be sent to CloudWatch. Each Artillery metric will create a custom CloudWatch metric (opens in a new tab), which incur extra AWS fee for each metric. You can configure a specific list of metrics to send with the includeOnly setting (see Configuration section below).

You can learn more about AWS CloudWatch custom metric pricing in this blog post from Vantage.sh: https://www.vantage.sh/blog/cloudwatch-metrics-pricing-explained-in-plain-english (opens in a new tab)

Important: AWS credentials have to be present in the environment and have sufficient IAM permissions to publish CloudWatch metrics.

Configuration

  • region - CloudWatch region where metrics will be sent
  • namespace - Metric namespace. Defaults to "artillery".
  • name - The value of the default Name dimension attached to every metric. Defaults to "loadtest".
  • excluded - A list of metric names which should not be sent to CloudWatch. Defaults to an empty list, i.e. all metrics are sent to CloudWatch.
  • includeOnly - A list of specific metrics to send to CloudWatch. No other metrics will be sent. Defaults to an empty list, i.e. all metrics are sent to CloudWatch.
  • dimensions - A list of extra dimensions to attache to every metric as name/value pairs. Defaults to an empty list.

Example

The following configuration enables CloudWatch reporting. All metrics generated by the test will be sent to us-east-1 region, and tagged with extra dimensions to specify the team running the tests (SQA), and the name of the service under test (checkout-svc).

config:
  plugins:
    publish-metrics:
      - type: cloudwatch
        region: us-east-1
        namespace: continous-testing
        dimensions:
          - name: Team
            value: SQA
          - name: Service
            value: checkout-svc