setMaxEventPoolSize:(unsigned int)size; NewRelic.setMaxEventPoolSize(unsigned int $size)
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 value(s)
Returns true
if recorded successfully, and false
if it doesn't.
Example(s)
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)