Cloud options
When executing a k6 test, you can run them locally, or in the cloud. When running tests on Grafana Cloud, you have access to additional configuration options that you can define in the options
object, such as load zones, or static IP addresses.
These configuration options are optional.
Note
This page only covers cloud options. For more information about all available options parameters, refer to Options.
Example
In your test script, you can configure cloud options by using the options.cloud
object:
export const options = {
cloud: {
name: 'Hello k6 cloud!',
projectID: 123456,
staticIPs: true,
drop_metrics: ['http_req_tls_handshaking', 'http_req_waiting', 'http_req_connecting'],
drop_tags: { '*': ['instance_id'] },
keep_tags: { http_req_waiting: ['instance_id'] },
distribution: {
distributionLabel1: { loadZone: 'amazon:us:ashburn', percent: 50 },
distributionLabel2: { loadZone: 'amazon:ie:dublin', percent: 50 },
},
note: 'Anything that may be worth noting about your test.',
},
};
Options and syntax
Note
ThedeleteSensitiveData
option is unavailable in default subscriptions. If you want to activate it, contact support at support@k6.io.
Options to reduce time series
The Too many time series
alert aborts a test run.
Sometimes, though, a test might trigger the alert even if the script follows all recommended practices from the performance insight.
In these cases, you can consider the drop_metrics
and drop_tags
options.
Note that if you use these options, some graphs may appear empty for the metrics deleted.
Certain important tags and metrics can’t be dropped:
- For metrics, you can’t drop
vus
. - For tags, you can’t drop:
instance_id
fromiterations
,load_generator_cpu_percent
,load_generator_file_handles
,load_generator_memory_percent
,vus
, andvus_max
.test_run_id
.