Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[load testing] add branch and buildId in APM labels #142996

Merged
merged 1 commit into from
Oct 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions x-pack/test/load/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const APM_SERVER_URL = 'https://142fea2d3047486e925eb8b223559cae.apm.europe-west
const APM_PUBLIC_TOKEN = 'pWFFEym07AKBBhUE2i';
const AGGS_SHARD_DELAY = process.env.LOAD_TESTING_SHARD_DELAY;
const DISABLE_PLUGINS = process.env.LOAD_TESTING_DISABLE_PLUGINS;
const journeyName = process.env.GATLING_SIMULATIONS;
const testBuildId = process.env.BUILD_ID;
const branchName = process.env.KIBANA_BRANCH;

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const kibanaCommonTestsConfig = await readConfigFile(
Expand Down Expand Up @@ -60,12 +63,12 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
ELASTIC_APM_SERVER_URL: APM_SERVER_URL,
ELASTIC_APM_SECRET_TOKEN: APM_PUBLIC_TOKEN,
ELASTIC_APM_GLOBAL_LABELS: Object.entries({
simulation: process.env.GATLING_SIMULATIONS
? process.env.GATLING_SIMULATIONS
: 'unknown simulation',
journeyName,
testBuildId,
branchName,
})
.filter(([, v]) => !!v)
.reduce((acc, [k, v]) => (acc ? `${acc},${k}=${v}` : `${k}=${v}`), ''),
.flatMap(([key, value]) => (value == null ? [] : `${key}=${value}`))
.join(','),
},
// delay shutdown by 150 seconds to ensure that APM can report the data it collects during test execution
delayShutdown: 150_000,
Expand Down