Event Debouncing
Because gameplay updates at a very high frequency of 60 times a second or even higher, an optional debouncing mechanism is in place. Every type of log has its own time slot. If EnableLogDebounce
is enabled and the game triggers too many events of the same type in quick succession, Sentry will only capture the first of its kind, then ignore (debounce) the other events of the same type.
Event debouncing is disabled
by default.
The time that needs to pass after an event has been triggered to be captured again:
LogType.Log
- one secondLogType.Warning
- one secondLogType.Error
,LogType.Exception
,LogType.Assert
and actual exceptions - one second
Copied
using UnityEngine;
public class DebouncerTestMonoBehaviour : MonoBehaviour
{
void Start()
{
SentryUnity.Init(o =>
{
o.Dsn = "https://examplePublicKey@o0.ingest.sentry.io/0";
o.EnableLogDebouncing = true;
});
// The time between debug calls of the same type is less than 1s
// Every following call of the same type gets ignored until 1s has passed
Debug.Log("Log"); // recorded
Debug.Log("Log 2"); // not recorded
Debug.LogWarning("Warning"); // recorded
Debug.LogWarning("Warning 2"); // not recorded
Debug.LogError("Error"); // recorded
Debug.LogError("Error 2"); // not recorded
}
}
- Package:
- upm:sentry-unity
- Version:
- 2.1.3
- Repository:
- https://github.com/getsentry/sentry-unity