You can utilize configuration options to adapt the Elastic APM agent to your needs.
One way to do this is to configure settings via the
elastic_apm.server_url=http://localhost:8200 elastic_apm.service_name="My service"
The agent can also be configured using environment variables:
export ELASTIC_APM_SERVER_URL="http://localhost:8200" export ELASTIC_APM_SERVICE_NAME="My service"
If you use environment variables to configure the agent, make sure the process running your PHP code inherits those environment variables after they were set.
Elasticsearch Service on Elastic Cloudedit
Configure the agent, for example via
elastic_apm.server_url=APM_SERVER_URL elastic_apm.secret_token=TOKEN elastic_apm.service_name=SERVICE_NAME
The easiest way to configure the logging is by using the
log_level_syslog configuration option.
Available log levels are:
OFF CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACE
For example, if you specify
WARNING log level, only log records with levels
will be emitted.
OFF is only used to disable agent logging.
There cannot be log records with level
The agent supports logging to the following sinks: syslog and stderr.
You can control the level of logging for individual sinks with the
When a sink-specific logging level is not set explicitly, the fallback setting,
log_level, will be used.
For example, the following configuration sets the log level to
NOTICE for all the sinks:
Alternatively, the following configuration sets log level to
NOTICE for all the sinks
syslog, which log level is set to