sentry-docs
sentry-docs copied to clipboard
Are the `maxQueueAgeDays ` and `maxQueueCount ` two fields still valid in the latest version in @sentry/electron
Core or SDK?
Platform/SDK
Which part? Which one?
@sentry/electron 5.1.0 Offline Support
Description
/* The maximum number of days to keep an event in the queue. */
maxQueueAgeDays: 30,
/* The maximum number of events to keep in the queue. */
maxQueueCount: 30,
I find in this file, the newest key is maxAgeDays and maxQueueSize
https://github.com/getsentry/sentry-electron/blob/eeef359b489196fa36dec804124d3404477a8177/src/main/transports/offline-store.ts#L24
Suggested Solution
If the key has been modified, we need to update the demo in the doc
Assigning to @getsentry/support for routing ⏲️
I've opened a PR to update the options in the docs. They should have been:
{
/* The maximum number of days to keep an envelope in the queue. */
maxAgeDays: 30,
/* The maximum number of envelopes to keep in the queue. */
maxQueueSize: 30,
/**
* Called before we attempt to send an envelope to Sentry.
*
* If this function returns false, `shouldStore` will be called to determine if the envelope should be stored.
*
* Default: () => true
*
* @param envelope The envelope that will be sent.
* @returns Whether we should attempt to send the envelope
*/
shouldSend: (envelope: Envelope) => boolean | Promise<boolean>;
/**
* Called before an event is stored.
*
* Return false to drop the envelope rather than store it.
*
* Default: () => true
*
* @param envelope The envelope that failed to send.
* @param error The error that occurred.
* @param retryDelay The current retry delay in milliseconds.
* @returns Whether we should store the envelope in the queue
*/
shouldStore: (envelope: Envelope, error: Error, retryDelay: number) => boolean | Promise<boolean>;
/**
* Should the offline store flush shortly after startup.
*
* Defaults: false
*/
flushAtStartup: false;
},