Commit 4be2201
authored
feat: Event queue early stop in buffer overflow (#118)
- drop events early (optimization)
- rethrow initialization error (fix oflline)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Optimizes event batching and improves error handling.
>
> - In `EventQueue`, introduce `SendResult` and change batch
`send([payloads])` to early-stop on total buffer overflow and skip
further items for exporters that hit per-exporter limits; `send(_:)` now
returns a result and triggers overflow notifications before stopping.
> - In `SessionReplayExporter`, rethrow initialization errors after
logging so callers can handle failures.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f8ae091. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 8a03120 commit 4be2201
File tree
2 files changed
+27
-5
lines changed- Sources
- LaunchDarklyObservability/Transport
- LaunchDarklySessionReplay/Exporter
2 files changed
+27
-5
lines changedLines changed: 26 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
| |||
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
76 | | - | |
77 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
78 | 98 | | |
79 | 99 | | |
80 | 100 | | |
81 | | - | |
| 101 | + | |
82 | 102 | | |
83 | 103 | | |
84 | 104 | | |
85 | | - | |
| 105 | + | |
86 | 106 | | |
87 | 107 | | |
88 | 108 | | |
89 | 109 | | |
90 | 110 | | |
91 | | - | |
| 111 | + | |
92 | 112 | | |
93 | 113 | | |
94 | 114 | | |
95 | 115 | | |
96 | 116 | | |
97 | 117 | | |
98 | 118 | | |
| 119 | + | |
99 | 120 | | |
100 | 121 | | |
101 | 122 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
0 commit comments