• /
  • ログイン
  • 無料アカウント

setMaxEventPoolSize (iOS SDK API)

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, 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 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. You must set this value after Agent.start() is called.

  • The default value for the event harvest cycle is 600 seconds.

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:

Parameters

Parameter

Description

#size

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)

その他のヘルプ

さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:

問題を作成するこのページを編集する
Copyright © 2020 New Relic Inc.