Configuration referenceedit
api_key
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
None |
String |
This string is used to ensure that only your agents can send data to your APM Server. You must have created the API key using the APM Server’s command line tool.
api_key
is an alternative to secret_token
.
If both secret_token
and api_key
are configured
then api_key
has precedence and secret_token
is ignored.
This feature is fully supported in the APM Server versions >= 7.6.
The api_key
value is sent as plain-text in every request to the server, so you should also secure
your communications using HTTPS. Unless you do so, your API Key could be observed by an attacker.
enabled
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
false |
Boolean |
Setting to false will completely disable the agent.
environment
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
None |
String |
The name of the environment this service is deployed in, e.g. "production" or "staging".
Environments allow you to easily filter data on a global level in the APM app. It’s important to be consistent when naming environments across agents. See environment selector in the Kibana UI for more information.
This feature is fully supported in the APM app in Kibana versions >= 7.2. You must use the query bar to filter for a specific environment in versions prior to 7.2.
log_level
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
None |
Log level |
Fallback configuration setting to control the logging level for the agent. This setting has effect for the sink when sink specific option is not set explicitly. See Logging for details.
log_level_stderr
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
|
Log level |
The logging level for stderr
logging sink.
See Logging for details.
log_level_syslog
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
|
Log level |
The logging level for syslog
logging sink.
See Logging for details.
secret_token
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
None |
String |
This string is used to ensure that only your agents can send data to your APM Server. Both the agents and the APM Server have to be configured with the same secret token.
See the relevant APM Server’s documentation on how to configure APM Server’s secret token.
Use this setting if the APM Server requires a token, like in Elasticsearch Service.
secret_token
is an alternative to api_key
.
If both secret_token
and api_key
are configured
then api_key
has precedence and secret_token
is ignored.
The secret_token
is sent as plain-text in every request to the server, so you should also secure
your communications using HTTPS. Unless you do so, your secret token could be observed by an attacker.
server_timeout
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
|
Duration |
If a request sending events to the APM server takes longer than the configured timeout, the request is canceled, and the events are discarded.
This configuration option supports the duration suffixes: ms
, s
and m
.
For example: 10s
.
This option’s default unit is s
, so 5
is interpreted as 5s
.
If the value is 0
(or 0ms
, 0s
, etc.) the timeout for sending events to the APM Server is disabled.
If the value is negative, it’s invalid, and the default value is used instead.
server_url
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
|
String |
The URL for your APM Server. The URL must be fully qualified, including protocol (http
or https
) and port.
service_name
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
|
String |
This is used to keep all the errors and transactions of your service together and it is the primary filter in the Elastic APM user interface.
The service name must conform to this regular expression: ^[a-zA-Z0-9 _-]+$
.
In less regexy terms: your service name must only contain characters from the ASCII alphabet,
numbers, dashes, underscores and spaces.
Characters in service name which don’t match regular expression will be replaced by _
(underscore) character.
service_version
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
None |
String |
The version of the currently deployed service. If you don’t version your deployments, the recommended value for this field is the commit identifier of the deployed revision, e.g., the output of git rev-parse HEAD.
transaction_max_spans
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
500 |
Integer |
Limits the amount of spans that are recorded per transaction. This is helpful in cases where a transaction creates a very high amount of spans, for example, thousands of SQL queries. Setting an upper limit helps prevent overloading the Agent and APM server in these edge cases.
If the value is 0
no spans will be collected.
If the value is negative, it’s invalid, and the default value is used instead.
transaction_sample_rate
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
1.0 |
Floating-point number |
By default, the agent will sample every transaction (e.g., a request to your service). To reduce overhead and storage requirements, you can set the sample rate to a value between 0.0 and 1.0. The agent will still record the overall time and result for unsampled transactions, but not context information, labels, or spans.
verify_server_cert
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
|
Boolean |
By default, the agent verifies the SSL certificate if you use an HTTPS connection to the APM server.
The verification can be disabled by changing this setting to false
.