[8.11] [journeys] re-enable APM instrumentation for Elasticsearch (#168198) (#168220)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[journeys] re-enable APM instrumentation for Elasticsearch
(#168198)](https://github.com/elastic/kibana/pull/168198)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2023-10-06T13:18:20Z","message":"[journeys]
re-enable APM instrumentation for Elasticsearch (#168198)\n\n##
Summary\r\n\r\nIn #167810 I disabled APM for ES due to ES crash. The
issue was fixed\r\nand it is working for me locally.\r\n\r\nperf
journeys pipeline
check\r\nhttps://buildkite.com/elastic/kibana-single-user-performance/builds/11578\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"96e785d7cf3af9a0cebeea904a1cadc7a2d9a804","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","wg:performance","v8.12.0","v8.11.1"],"number":168198,"url":"https://github.com/elastic/kibana/pull/168198","mergeCommit":{"message":"[journeys]
re-enable APM instrumentation for Elasticsearch (#168198)\n\n##
Summary\r\n\r\nIn #167810 I disabled APM for ES due to ES crash. The
issue was fixed\r\nand it is working for me locally.\r\n\r\nperf
journeys pipeline
check\r\nhttps://buildkite.com/elastic/kibana-single-user-performance/builds/11578\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"96e785d7cf3af9a0cebeea904a1cadc7a2d9a804"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168198","number":168198,"mergeCommit":{"message":"[journeys]
re-enable APM instrumentation for Elasticsearch (#168198)\n\n##
Summary\r\n\r\nIn #167810 I disabled APM for ES due to ES crash. The
issue was fixed\r\nand it is working for me locally.\r\n\r\nperf
journeys pipeline
check\r\nhttps://buildkite.com/elastic/kibana-single-user-performance/builds/11578\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"96e785d7cf3af9a0cebeea904a1cadc7a2d9a804"}},{"branch":"8.11","label":"v8.11.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
This commit is contained in:
Kibana Machine 2023-10-10 09:33:25 -04:00 committed by GitHub
parent f2d9979e12
commit ef15dcb9ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 15 deletions

View file

@ -11,6 +11,7 @@ import { run } from '@kbn/dev-cli-runner';
import { REPO_ROOT } from '@kbn/repo-info';
import fs from 'fs';
import path from 'path';
import { JOURNEY_APM_CONFIG } from '@kbn/journeys';
const JOURNEY_BASE_PATH = 'x-pack/performance/journeys';
@ -107,21 +108,20 @@ run(
'scripts/es',
'snapshot',
'--license=trial',
// Disabling APM until https://github.com/elastic/elasticsearch/issues/100072 is fixed
// ...(JOURNEY_APM_CONFIG.active
// ? [
// '-E',
// 'tracing.apm.enabled=true',
// '-E',
// 'tracing.apm.agent.transaction_sample_rate=1.0',
// '-E',
// `tracing.apm.agent.server_url=${JOURNEY_APM_CONFIG.serverUrl}`,
// '-E',
// `tracing.apm.agent.secret_token=${JOURNEY_APM_CONFIG.secretToken}`,
// '-E',
// `tracing.apm.agent.environment=${JOURNEY_APM_CONFIG.environment}`,
// ]
// : []),
...(JOURNEY_APM_CONFIG.active
? [
'-E',
'tracing.apm.enabled=true',
'-E',
'tracing.apm.agent.transaction_sample_rate=1.0',
'-E',
`tracing.apm.agent.server_url=${JOURNEY_APM_CONFIG.serverUrl}`,
'-E',
`tracing.apm.agent.secret_token=${JOURNEY_APM_CONFIG.secretToken}`,
'-E',
`tracing.apm.agent.environment=${JOURNEY_APM_CONFIG.environment}`,
]
: []),
],
cwd: REPO_ROOT,
wait: /kbn\/es setup complete/,

View file

@ -39,5 +39,6 @@
"@kbn/get-repo-files",
"@kbn/import-locator",
"@kbn/config-schema",
"@kbn/journeys",
]
}