Configure head-based sampling
editConfigure head-based sampling
editThere are three ways to adjust the head-based sampling rate of your APM agents:
Dynamic configuration
editThe transaction sample rate can be changed dynamically (no redeployment necessary) on a per-service and per-environment basis with APM agent Configuration in Kibana.
Kibana API configuration
editAPM agent configuration exposes an API that can be used to programmatically change your agents' sampling rate. An example is provided in the Agent configuration API reference.
APM agent configuration
editEach agent provides a configuration value used to set the transaction sample rate. See the relevant agent’s documentation for more details:
-
Go:
ELASTIC_APM_TRANSACTION_SAMPLE_RATE
-
Java:
transaction_sample_rate
-
.NET:
TransactionSampleRate
-
Node.js:
transactionSampleRate
-
PHP:
transaction_sample_rate
-
Python:
transaction_sample_rate
-
Ruby:
transaction_sample_rate