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

setMaxEventPoolSize (Android SDK API)

Syntax

NewRelic.setMaxEventPoolSize(int $maxSize)

Sets the maximum size of the event pool.

Requirements

Agent version 5.0.0 or higher.

Description

By default, New Relic for Mobile collects a maximum of 1,000 events per harvest cycle (cycles are ten minutes long by default). This method lets you override the maximum size of that event pool. 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.

See also setMaxEventBufferTime(), which lets you change the length of the event 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 to Insights.

Parameters

Parameter

Description

$maxSize

int

Required. Maximum size of event pool.

Return values

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

Examples

Set maximum size of event pool to 1000

boolean poolSizeSet = NewRelic.setMaxEventPoolSize(1000);

その他のヘルプ

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

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