You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's currently possible to enable logging when using the no-code startup hooks by configuring the following two env vars:
ELASTIC_APM_PROFILER_LOG, which takes the log level to use
ELASTIC_APM_PROFILER_LOG_DIR, which defines where profiler logs (and potentially agent logs are written)
Due to implementation changes we have previously made, when no logger is set in AgentComponents, the profiler checks fallback logs to a file in the provided directory. This behaviour is helpful, especially for no-code scenarios, but the environment variable names are confusing. We also have ELASTIC_APM_LOG_LEVEL, which doesn't apply in the no-code case.
We should rename ELASTIC_APM_PROFILER_LOG_DIR to ELASTIC_APM_LOG_DIRECTORY and, when set, use this for all file-based logging, including startup hooks logging.
We should remove ELASTIC_APM_PROFILER_LOG and always use the more descriptive ELASTIC_APM_LOG_LEVEL variable for configuring the overall log level of all logs (agent and profiler). The profiler also listens to ELASTIC_APM_LOG_LEVEL and currently prefers the more granular of the two.
When ELASTIC_APM_LOG_DIRECTORY is set, even with another logging provider (e.g., ILogger) enabled, we should consider whether we also log to a file in this directory.
These changes will simplify troubleshooting and make gathering all relevant logs for support scenarios easier.
We should ensure all docs concerning these environment variables are updated, including ELASTIC_APM_STARTUP_HOOKS_LOGGING,
The text was updated successfully, but these errors were encountered:
It's currently possible to enable logging when using the no-code startup hooks by configuring the following two env vars:
ELASTIC_APM_PROFILER_LOG
, which takes the log level to useELASTIC_APM_PROFILER_LOG_DIR
, which defines where profiler logs (and potentially agent logs are written)Due to implementation changes we have previously made, when no logger is set in
AgentComponents
, the profiler checks fallback logs to a file in the provided directory. This behaviour is helpful, especially for no-code scenarios, but the environment variable names are confusing. We also haveELASTIC_APM_LOG_LEVEL
, which doesn't apply in the no-code case.We should rename
ELASTIC_APM_PROFILER_LOG_DIR
toELASTIC_APM_LOG_DIRECTORY
and, when set, use this for all file-based logging, including startup hooks logging.We should remove
ELASTIC_APM_PROFILER_LOG
and always use the more descriptiveELASTIC_APM_LOG_LEVEL
variable for configuring the overall log level of all logs (agent and profiler). The profiler also listens toELASTIC_APM_LOG_LEVEL
and currently prefers the more granular of the two.When
ELASTIC_APM_LOG_DIRECTORY
is set, even with another logging provider (e.g., ILogger) enabled, we should consider whether we also log to a file in this directory.These changes will simplify troubleshooting and make gathering all relevant logs for support scenarios easier.
We should ensure all docs concerning these environment variables are updated, including
ELASTIC_APM_STARTUP_HOOKS_LOGGING
,The text was updated successfully, but these errors were encountered: