Core configuration options
editCore configuration options
editactive
editA boolean specifying if the agent should be active or not. If active, the agent will instrument incoming HTTP requests and track errors.
You can use this setting to dynamically disable Elastic APM at runtime.
Default | Type | Dynamic |
---|---|---|
|
Boolean |
true |
Java System Properties | Property file | Environment |
---|---|---|
|
|
|
instrument
editA boolean specifying if the agent should instrument the application to collect performance metrics for the app. When set to false, Elastic APM will not affect your application at all.
Both active and instrument needs to be true for instrumentation to be running.
Default | Type | Dynamic |
---|---|---|
|
Boolean |
false |
Java System Properties | Property file | Environment |
---|---|---|
|
|
|
service_name
editThis 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 less regexy terms: Your service name must only contain characters from the ASCII alphabet, numbers, dashes, underscores and spaces.
Default | Type | Dynamic |
---|---|---|
|
String |
false |
Java System Properties | Property file | Environment |
---|---|---|
|
|
|
service_version
editA version string for the currently deployed version of the 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.
Default | Type | Dynamic |
---|---|---|
|
String |
false |
Java System Properties | Property file | Environment |
---|---|---|
|
|
|
environment
editThe name of the environment this service is deployed in, e.g. "production" or "staging".
Default | Type | Dynamic |
---|---|---|
|
String |
false |
Java System Properties | Property file | Environment |
---|---|---|
|
|
|
sample_rate
editBy default, the agent will sample every transaction (e.g. 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. We still record overall time and the result for unsampled transactions, but no context information, tags, or spans.
Default | Type | Dynamic |
---|---|---|
|
Double |
true |
Java System Properties | Property file | Environment |
---|---|---|
|
|
|
transaction_max_spans
editLimits the amount of spans that are recorded per transaction.
This is helpful in cases where a transaction creates a very high amount of spans (e.g. thousands of SQL queries).
Setting an upper limit will prevent overloading the agent and the APM server with too much work for such edge cases.
Default | Type | Dynamic |
---|---|---|
|
Integer |
true |
Java System Properties | Property file | Environment |
---|---|---|
|
|
|
sanitize_field_names
editSometimes it is necessary to sanitize the data sent to Elastic APM, e.g. remove sensitive data.
Configure a list of wildcard patterns of field names which should be sanitized.
These apply for example to HTTP headers and application/x-www-form-urlencoded
data.
Entries can have a wildcard at the beginning and at the end.
Prepending an element with (?i)
makes the matching case-insensitive.
Data in the query string is considered non-sensitive, as sensitive information should not be sent in the query string. See https://www.owasp.org/index.php/Information_exposure_through_query_strings_in_url for more information
Review the data captured by Elastic APM carefully to make sure it does not capture sensitive information. If you do find sensitive data in the Elasticsearch index, you should add an additional entry to this list (make sure to also include the default entries).
Default | Type | Dynamic |
---|---|---|
|
List |
true |
Java System Properties | Property file | Environment |
---|---|---|
|
|
|
disable_instrumentations
editA list of instrumentations which should be disabled. Valid options are jdbc
, servlet-api
and spring-mvc
.
Default | Type | Dynamic |
---|---|---|
|
Collection |
false |
Java System Properties | Property file | Environment |
---|---|---|
|
|
|