The DISABLE_LOGGING_AND_METRICS environment variable is used in two places:
- Configuring Log4JS
|
if (process.env.DISABLE_LOGGING_AND_METRICS === 'true') { |
|
configure(disableLog4js); |
|
} else { |
|
configure(enableLog4js); |
|
} |
- Publishing application level CloudWatch Metrics
|
if (process.env.DISABLE_LOGGING_AND_METRICS !== 'true') { |
|
setInterval(() => { |
|
recordBaselineCloudWatchMetrics(); |
|
}, 10 * 1000); |
|
} |
When run in a container (see #16234) it is more standard to log to stdout/stderr and then have a sidecar container process the logs. Therefore, Log4JS is not needed.
When running in a container, we still want to produce application metrics. Can we separate this environment variable in two to enable/disable logging and metrics independently?
The
DISABLE_LOGGING_AND_METRICSenvironment variable is used in two places:dotcom-rendering/dotcom-rendering/src/server/lib/logging.ts
Lines 132 to 136 in f73f19c
dotcom-rendering/dotcom-rendering/src/server/server.prod.ts
Lines 100 to 104 in f73f19c
When run in a container (see #16234) it is more standard to log to stdout/stderr and then have a sidecar container process the logs. Therefore, Log4JS is not needed.
When running in a container, we still want to produce application metrics. Can we separate this environment variable in two to enable/disable logging and metrics independently?