Skip to content

Commit

Permalink
Merge pull request #6693 from JimHagan/jhagan-dicuss-event-limits-for…
Browse files Browse the repository at this point in the history
…-apm-optimization
  • Loading branch information
paperclypse committed Mar 21, 2022
2 parents d576963 + dcdb0bc commit 0911fe8
Showing 1 changed file with 27 additions and 0 deletions.
Expand Up @@ -250,6 +250,33 @@ Common database query setting changes include:

More details can be found [here](docs/apm/transactions/transaction-traces/transaction-traces-database-queries-page/#settings).

### Setting Event Limits

Our APM and mobile agents have limits on how many events can be reported per harvest cycle. If there were no limit, a very large number of events being sent could impact the performance of your application or New Relic. When the limit is reached, the agents begin sampling events in order to give a representative sample of events across the harvest cycle. Different agents have different limits.

Events that are capped and subject to sampling include:

* Custom events reported via agent API (for example, the .NET agent's `RecordCustomEvent`)
* Mobile
* MobileCrash
* MobileHandledException
* MobileRequest
* Span (see Distributed tracing sampling)
* Transaction
* TransactionError

Most agents have configuration options for changing the event limit on sampled transactions. For example the Java agent uses [max_samples_stored](https://docs.newrelic.com/docs/agents/java-agent/configuration/java-agent-configuration-config-file#ae-max_samples_stored). The default value for *max_samples_stored* is `2000` and the max is `10000`. This value governs how many sampled events can be reported every 60 seconds from an agent instance.

Here us a full explanation of [event sampling limits](https://docs.newrelic.com/docs/using-new-relic/data/understand-data/new-relic-event-limits-sampling/)

You can compensate for sampled events via [NRQL's `EXTRAPOLATE` operator](/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions/#extrapolate).

Before attempting to change how sampling occurs, please read these caveats and recommendations:

* The more events you report, the more memory your agent will use..
* You can usually get the data you need without raising an agent's event-reporting limit.
* The payload size limit is 1MB (10^6 bytes) (compressed), so the number of events may still be affected by that limit. To determine if events are being dropped, see the agent log for a`413 HTTP` status message.

### Transaction traces

<Callout variant='IMPORTANT' title='Growth Drivers'>
Expand Down

0 comments on commit 0911fe8

Please sign in to comment.