Syntax
setMaxEventBufferTime:(unsigned int)seconds;NewRelic.setMaxEventBufferTime:(unsigned int)seconds;
Sets the event harvest cycle length. Default is 600 seconds.
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
Sets the maximum time (in seconds) that the agent will store events in memory. When the oldest event exceeds this time, the agent transmits the buffered content at the harvest cycle. You must set this value after the start call.
- Default is 600 seconds (10 minutes).
- Minimum value cannot be less than 60 seconds.
See also setMaxEventPoolSize()
, which lets you change the maximum size of the event pool.
For context on how to use this API, see the documentation about sending custom attributes and events to Insights for:
Return values
Returns true
if recorded successfully, and false
if it doesn't.
Examples
Objective-C
Method:
+ (void) setMaxEventBufferTime:(unsigned int)seconds;
Example:
BOOL fiveMinuteLimitSet = [NewRelic setMaxEventBufferTime:600];
Swift
Method:
NewRelic.setMaxEventBufferTime(seconds: UInt32)
Example:
let fiveMinuteLimitSet = NewRelic.setMaxEventBufferTime(600)
その他のヘルプ
さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:
- Explorers Hubでは、コミュニティからのサポートを受けたり、ディスカッションに参加したりすることができます。
- 当社サイトで答えを見つけて、サポートポータルの使用方法を確認してください。
- Linux、Windows、およびmacOS向けトラブルシューティングツールであるNew Relic Diagnosticsを実行してください。
- New Relicのデータセキュリティとライセンスドキュメント をご確認ください。