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 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.
breakdown_metrics
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
true |
Boolean |
If this configuration option is set to true
the agent will collect and report
breakdown metrics (span.self_time
) used for "Time spent by span type" chart.
Set it to false
to disable the collection and reporting of
breakdown metrics, which can reduce the overhead of the agent.
This feature requires APM Server and Kibana >= 7.3.
disable_instrumentations
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
empty list |
List of strings |
A comma-separated list of wildcard expressions to match
instrumentation names which should be disabled.
When an instrumentation is disabled, no spans will be created for that instrumentation.
An instrumentation may match more than one name -
for example PDO instrumentation matches both db
and pdo
.
Valid instrumentation names are curl
, db
, http-client
, pdo
.
disable_send
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
false |
Boolean |
If set to true
, the agent will work as usual, except for any task requiring
communication with the APM server. Events will be dropped and the agent won’t be
able to receive central configuration, which means that any other configuration
cannot be changed in this state without restarting the service. Example uses
for this setting are: maintaining the ability to create traces and log
trace/transaction/span IDs through the log correlation feature, and getting
automatic distributed tracing via the W3C HTTP headers.
enabled
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
true |
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.
hostname
edit
Hostname variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
the local machine’s host name |
String |
This option allows for the reported host name to be configured. If this option is not set the local machine’s host name is used.
log_level
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
None |
Log level |
A fallback configuration setting to control the logging level for the agent. Only used when a sink-specific option is not explicitly set. 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.
The value has to be provided in duration format.
This option’s default unit is s
(seconds).
If the value is 0
(or 0ms
, 0s
, etc.) the timeout for sending events to the APM Server is disabled.
Negative values are invalid and result in the default value being 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 is the primary filter in the Elastic APM user interface.
The service name must conform to this regular expression: ^[a-zA-Z0-9 _-]+$
.
In other words, a service name must only contain characters from the ASCII alphabet,
numbers, dashes, underscores, and spaces.
Characters in service name that don’t match regular expression will be replaced by _
(underscore) character.
service_node_name
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
None |
String |
If it’s set, this name is used to distinguish between different nodes of a service.
If it’s not set, data aggregations will be done based on the reported
hostname (automatically discovered or manually configured using hostname
).
service_version
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
None |
String |
The version of the currently deployed service. If your deployments are not versioned, the recommended value for this field is the commit identifier of the deployed revision, e.g., the output of git rev-parse HEAD.
transaction_ignore_urls
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
empty list |
List of wildcard expressions |
This option instructs the agent to ignore requests with certain URLs by not to creating transactions for those requests. It only affects automatic creation of transactions by the agent but user can still create transactions manually by using agent’s public API.
See Wildcard section for more details on how to use wildcard expressions.
transaction_max_spans
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
500 |
Integer |
This 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.
Negative values are invalid and result in the default value being 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, set the sample rate to a value between 0.0
and 1.0
.
The agent still records 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
.
url_groups
edit
Environment variable name | Option name in php.ini |
---|---|
|
|
Default | Type |
---|---|
empty list |
List of wildcard expressions |
With this option, you can group several URL paths together by using wildcard expressions
like /user/*
- this way /user/Alice
and /user/Bob
will be mapped to transaction name /user/*
.
See Wildcard section for more details on how to use wildcard expressions.