• English日本語한국어
  • Log inStart now

setMaxEventBufferTime (Android SDK API)


NewRelic.setMaxEventBufferTime(int $maxBufferTimeInSec)

Sets the event harvest cycle length.


Agent version 5.0.0 or higher.


This method sets the maximum time in seconds that the New Relic Android agent will store events in memory before including the buffered event to be sent to New Relic in the next harvest cycle.

  • Default is 600 seconds (10 minutes).
  • Minimum value cannot be less than 60 seconds.
  • Maximum value should not be greater than 600 seconds.

In other words, when the oldest event timestamp exceeds this custom configured time, the agent transmits the buffered content at the harvest cycle between each connection from a New Relic agent to the collector.

See also setMaxEventPoolSize(), which sets the maximum number of events that are stored by the agent during a harvest cycle.


Be aware that reporting a large number of events, or reporting events too frequently, may impact app performance.

For context on how to use this API, see Send custom attributes and events.






Required. The maximum time (in seconds) that the agent should store events in memory. The default value harvest cycle length is 600 seconds.

Return values

Returns true if it succeeds, or false if it doesn't.


Set max event buffer time to 300 seconds

boolean fiveMinuteLimitSet = NewRelic.setMaxEventBufferTime(300);
Copyright © 2023 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.