Syntax
setMaxEventPoolSize:(unsigned int)size;NewRelic.setMaxEventPoolSize(unsigned int $size)
Sets the maximum size of the event pool.
Requirements
To ensure that the new value is always applied, place this API call in the applicationDidBecomeActive
iOS lifecycle method.
Compatible with all agent versions.
Description
By default, New Relic Mobile collects a maximum of 1000 events per harvest cycle. (Cycles are ten minutes long by default). When the pool size reaches its limit, New Relic Mobile's iOS agent will begin sampling events, discarding some old and some new events, until the pool of events are transmitted with the next harvest cycle.
This method lets you override the maximum size of that event pool. You must set this value after the start call.
See also setMaxEventBufferTime()
, which lets you change the length of the event harvest cycle.
For context on how to use this API, see the documentation about sending custom attributes and events to Insights for:
Parameters
Parameter | Description |
---|---|
integer | Required. |
Return values
Returns true
if recorded successfully, and false
if it doesn't.
Examples
Objective-C
Method:
+ (void) setMaxEventPoolSize:(unsigned int)size;
Example:
BOOL poolSizeSet = [NewRelic setMaxEventPoolSize:1000];
Swift
Method:
NewRelic.setMaxEventPoolSize(size: UInt32)
Example:
let poolSizeSet = NewRelic.setMaxEventPoolSize(1000)
For more help
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.