sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

BufferSize TransportOptions doesn't work

Open krystofwoldrich opened this issue 3 years ago • 6 comments

NativeTransport uses hardcoded 30 items in promise buffer

https://github.com/getsentry/sentry-react-native/blob/1e21438517050133d603247baeff05a464c76407/src/js/transports/native.ts#L11

Cocoa SDK uses different name for the bufferSize

https://github.com/getsentry/sentry-cocoa/blob/172c95a0f5823a6a1c37cd1b2d348ed047ba67b4/Sources/Sentry/SentryOptions.m#L47

The naming across the sdks should mathch.

krystofwoldrich avatar Sep 26 '22 12:09 krystofwoldrich

maxCacheItems is something else, it's how many envelopes can be cached In the disk (because of offline caching). on Android, there is another one called maxQueueSize, this one is the equivalent of BufferSize, but iOS does not have it apparently. @philipphofmann or @brustolin would know better if its called differently or internal only.

marandaneto avatar Sep 26 '22 12:09 marandaneto

No, we don't have maxQueueSize at all. We only have maxCacheItems which is public.

philipphofmann avatar Sep 26 '22 12:09 philipphofmann

@marandaneto And maxQueueSize is option of the sdk or transport?

krystofwoldrich avatar Sep 26 '22 13:09 krystofwoldrich

It's a public option on Java and most other SDKs.

philipphofmann avatar Sep 26 '22 13:09 philipphofmann

Okay, if I'm looking correct Transport gets the same SentryOptions.

In JS there is different interface only for TransportOptions, where bufferSize is defined.

https://github.com/getsentry/sentry-javascript/blob/fb267e019371e17ef87c0a861744b4eacce47624/packages/types/src/transport.ts#L19

krystofwoldrich avatar Sep 26 '22 13:09 krystofwoldrich

Deprecate the current unused option and used a new one named similar to the native mobile skds. Pass the options to java and ios. Keep default 30.

krystofwoldrich avatar Sep 30 '22 12:09 krystofwoldrich

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Oct 27 '22 00:10 github-actions[bot]