mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Hide stderr git output during APM agent configuration (#52878)
This commit is contained in:
parent
45563b2574
commit
f8ba2fdd78
1 changed files with 20 additions and 14 deletions
|
@ -42,19 +42,22 @@ const { join } = require('path');
|
|||
const { execSync } = require('child_process');
|
||||
const merge = require('lodash.merge');
|
||||
|
||||
module.exports = merge({
|
||||
active: false,
|
||||
serverUrl: 'https://f1542b814f674090afd914960583265f.apm.us-central1.gcp.cloud.es.io:443',
|
||||
// The secretToken below is intended to be hardcoded in this file even though
|
||||
// it makes it public. This is not a security/privacy issue. Normally we'd
|
||||
// instead disable the need for a secretToken in the APM Server config where
|
||||
// the data is transmitted to, but due to how it's being hosted, it's easier,
|
||||
// for now, to simply leave it in.
|
||||
secretToken: 'R0Gjg46pE9K9wGestd',
|
||||
globalLabels: {},
|
||||
centralConfig: false,
|
||||
logUncaughtExceptions: true
|
||||
}, devConfig());
|
||||
module.exports = merge(
|
||||
{
|
||||
active: false,
|
||||
serverUrl: 'https://f1542b814f674090afd914960583265f.apm.us-central1.gcp.cloud.es.io:443',
|
||||
// The secretToken below is intended to be hardcoded in this file even though
|
||||
// it makes it public. This is not a security/privacy issue. Normally we'd
|
||||
// instead disable the need for a secretToken in the APM Server config where
|
||||
// the data is transmitted to, but due to how it's being hosted, it's easier,
|
||||
// for now, to simply leave it in.
|
||||
secretToken: 'R0Gjg46pE9K9wGestd',
|
||||
globalLabels: {},
|
||||
centralConfig: false,
|
||||
logUncaughtExceptions: true,
|
||||
},
|
||||
devConfig()
|
||||
);
|
||||
|
||||
const rev = gitRev();
|
||||
if (rev !== null) module.exports.globalLabels.git_rev = rev;
|
||||
|
@ -66,7 +69,10 @@ try {
|
|||
|
||||
function gitRev() {
|
||||
try {
|
||||
return execSync('git rev-parse --short HEAD', { encoding: 'utf-8' }).trim();
|
||||
return execSync('git rev-parse --short HEAD', {
|
||||
encoding: 'utf-8',
|
||||
stdio: ['ignore', 'pipe', 'ignore'],
|
||||
}).trim();
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue