Syntax
Java
NewRelic.setMaxEventPoolSize(int $maxSize)
Kotlin
NewRelic.setMaxEventPoolSize(maxSize: Int)
Description
Sets the maximum size of the event pool.
By default, collects a maximum of 1,000 events per event harvest cycle, which is 600 seconds long by default. This method controls the maximum size of the event pool stored in the memory until the next harvest cycle. When the pool size limit is reached, the New Relic Android 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.
The default value for the event harvest cycle is 600 seconds. See Set max event buffer time to change the length of the event harvest cycle.
Importante
Be aware that reporting a large number of events, or reporting events too frequently, may impact app performance.
Parameters
Parameter | Type | Description |
---|---|---|
|
| Required. Maximum size of event pool. |
Example
Here's an example to set max size of event pool to 1000:
Java
NewRelic.setMaxEventPoolSize(1000);
Kotlin
NewRelic.setMaxEventPoolSize(1000)
Syntax
Objective-C
+ (void) setMaxEventPoolSize:(unsigned int)size;
Swift
NewRelic.setMaxEventPoolSize(unsigned int $size)
Description
Sets the maximum size of the event pool.
By default, the iOS agent collects a maximum of 1000 events per harvest cycle.
This method controls the maximum size of the event pool stored in the memory until the next harvest cycle. When the pool size limit is reached, the New Relic 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 Agent.start()
is called.
The default value for the event harvest cycle is 600 seconds. See also Set max event buffer time to change the length of the event harvest cycle.
To ensure that the new value is always applied, place this API call in the applicationDidBecomeActive
iOS lifecycle method.
Parameters
Parameter | Type | Description |
---|---|---|
|
| Required. The maximum number of events that can be buffered in memory before they are sent to New Relic. |
Examples
Objective-C
BOOL poolSizeSet = [NewRelic setMaxEventPoolSize:1000];
Swift
let poolSizeSet = NewRelic.setMaxEventPoolSize(1000)
Syntax
setMaxEventPoolSize(options: { maxPoolSize: number; }) => void
Description
Sets the maximum size of the event pool stored in memory until the next harvest cycle. Default is a maximum of 1000 events per event harvest cycle. When the pool size limit is reached, the agent will start sampling events, discarding some new and old, until the pool of events is sent in the next harvest cycle.
Parameters
Parameter | Type | Description |
---|---|---|
|
| Required. The maximum number of events that can be buffered in memory before they are sent to New Relic. |
Example
NewRelicCapacitorPlugin.setMaxEventPoolSize({ maxPoolSize: 2000 })
Syntax
setMaxEventPoolSize(maxSize: number): void;
Description
Sets the maximum size of the event pool stored in memory until the next harvest cycle. Default is a maximum of 1000 events per event harvest cycle. When the pool size limit is reached, the agent will start sampling events, discarding some new and old, until the pool of events is sent in the next harvest cycle.
Parameters
Parameter | Type | Description |
---|---|---|
|
| Required. The maximum number of events that can be buffered in memory before they are sent to New Relic. |
Example
NewRelic.setMaxEventPoolSize(2000);
Syntax
SetMaxEventPoolSize(int maxPoolSize): void;
Description
Sets the maximum size of the event pool stored in memory until the next harvest cycle. Default is a maximum of 1000 events per event harvest cycle. When the pool size limit is reached, the agent will start sampling events, discarding some new and old, until the pool of events is sent in the next harvest cycle.
Parameters
Parameter | Type | Description |
---|---|---|
|
| Required. The maximum number of events that can be buffered in memory before they are sent to New Relic. |
Example
CrossNewRelic.Current.SetMaxEventPoolSize(1500);
Syntax
setMaxEventPoolSize(int maxSize): void;
Description
Sets the maximum size of the event pool stored in memory until the next harvest cycle. Default is a maximum of 1000 events per event harvest cycle. When the pool size limit is reached, the agent will start sampling events, discarding some new and old, until the pool of events is sent in the next harvest cycle.
Parameters
Parameter | Type | Description |
---|---|---|
|
| Required. The maximum number of events that can be buffered in memory before they are sent to New Relic. |
Example
NewrelicMobile.instance.setMaxEventPoolSize(10000);
Syntax
setMaxEventPoolSize(maxSize: number): void;
Description
Sets the maximum size of the event pool stored in memory until the next harvest cycle. Default is a maximum of 1000 events per event harvest cycle. When the pool size limit is reached, the agent will start sampling events, discarding some new and old, until the pool of events is sent in the next harvest cycle.
Parameters
Parameter | Type | Description |
---|---|---|
|
| Required. The maximum number of events that can be buffered in memory before they are sent to New Relic. |
Example
NewRelic.setMaxEventPoolSize(2000);
Syntax
SetMaxEventPoolSize(int maxPoolSize): void;
Description
Sets the maximum size of the event pool stored in memory until the next harvest cycle. Default is a maximum of 1000 events per event harvest cycle. When the pool size limit is reached, the agent will start sampling events, discarding some new and old, until the pool of events is sent in the next harvest cycle.
Parameters
Parameter | Type | Description |
---|---|---|
|
| Required. The maximum number of events that can be buffered in memory before they are sent to New Relic. |
Example
NewRelicAgent.SetMaxEventPoolSize(1500);
Syntax
setMaxEventPoolSize(int64 maxSize): void;
Description
Sets the maximum size of the event pool stored in memory until the next harvest cycle. Default is a maximum of 1000 events per event harvest cycle. When the pool size limit is reached, the agent will start sampling events, discarding some new and old, until the pool of events is sent in the next harvest cycle.
Parameters
Parameter | Type | Description |
---|---|---|
|
| Required. The maximum number of events that can be buffered in memory before they are sent to New Relic. |
Example
#include "NewRelicBPLibrary.h"
UNewRelicBPLibrary::setMaxEventPoolSize(2000);
Syntax
SetMaxEventPoolSize(int maxPoolSize): void;
Description
Sets the maximum size of the event pool stored in memory until the next harvest cycle. Default is a maximum of 1000 events per event harvest cycle. When the pool size limit is reached, the agent will start sampling events, discarding some new and old, until the pool of events is sent in the next harvest cycle.
Parameters
Parameter | Type | Description |
---|---|---|
|
| Required. The maximum number of events that can be buffered in memory before they are sent to New Relic. |
Example
CrossNewRelicClient.Current.SetMaxEventPoolSize(1500);