mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* update config to enable apm
* wait 60 sec to get apm traces
* use suggested apm config
* set ELASTIC_APM_MAX_QUEUE_SIZE to collect full traces
* send APM data to Kibana stats
* increase delay shutdown
(cherry picked from commit 0f57c23e2c
)
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
This commit is contained in:
parent
1795289e74
commit
a4af0a88e4
2 changed files with 27 additions and 0 deletions
BIN
logs.tar.gz
Normal file
BIN
logs.tar.gz
Normal file
Binary file not shown.
|
@ -10,6 +10,10 @@ import { resolve } from 'path';
|
|||
import { FtrConfigProviderContext } from '@kbn/test';
|
||||
import { GatlingTestRunner } from './runner';
|
||||
|
||||
// These "secret" values are intentionally written in the source.
|
||||
const APM_SERVER_URL = 'https://142fea2d3047486e925eb8b223559cae.apm.europe-west1.gcp.cloud.es.io';
|
||||
const APM_PUBLIC_TOKEN = 'pWFFEym07AKBBhUE2i';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const kibanaCommonTestsConfig = await readConfigFile(
|
||||
require.resolve('../../../test/common/config.js')
|
||||
|
@ -40,6 +44,29 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
'--no-base-path',
|
||||
'--env.name=development',
|
||||
],
|
||||
env: {
|
||||
ELASTIC_APM_ACTIVE: process.env.ELASTIC_APM_ACTIVE,
|
||||
ELASTIC_APM_CENTRAL_CONFIG: false,
|
||||
ELASTIC_APM_TRANSACTION_SAMPLE_RATE: '0.1',
|
||||
ELASTIC_APM_BREAKDOWN_METRICS: false,
|
||||
ELASTIC_APM_CAPTURE_SPAN_STACK_TRACES: false,
|
||||
ELASTIC_APM_METRICS_INTERVAL: '120s',
|
||||
ELASTIC_APM_MAX_QUEUE_SIZE: 20480,
|
||||
ELASTIC_SANITIZE_FIELD_NAMES:
|
||||
'password,passwd,pwd,secret,*key,*token*,*session*,*credit*,*card*,*auth*,set-cookie,pw,pass,connect.sid',
|
||||
ELASTIC_APM_ENVIRONMENT: process.env.CI ? 'ci' : 'development',
|
||||
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',
|
||||
})
|
||||
.filter(([, v]) => !!v)
|
||||
.reduce((acc, [k, v]) => (acc ? `${acc},${k}=${v}` : `${k}=${v}`), ''),
|
||||
},
|
||||
// delay shutdown by 150 seconds to ensure that APM can report the data it collects during test execution
|
||||
delayShutdown: 150_000,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue