Commit ee96771
[AAP-73135] Revert to sync_mode after batch-limit approach proven insufficient
Testing showed the batch-limit heuristic still dropped events:
- 17 chunks in one batch (~425 KB tracked): only 12 arrived
- 26 chunks split into two batches: only 17 arrived
Root cause: the SDK adds ~2-3 KB of per-event metadata (context,
timestamps, messageId, integrations) that our data-size estimate did
not account for, pushing actual batch bodies over Segment's 500 KB
limit despite our 450 KB threshold.
sync_mode=True sends each track() as a separate blocking HTTP request
(~25 KB each) instead of batching, which eliminates the batch-size
problem entirely. Local end-to-end testing confirmed all 15 chunks
arrive reliably with sync_mode=True.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>1 parent fdb8e12 commit ee96771
2 files changed
Lines changed: 13 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 24 | | |
31 | 25 | | |
32 | 26 | | |
| |||
136 | 130 | | |
137 | 131 | | |
138 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
| |||
150 | 149 | | |
151 | 150 | | |
152 | 151 | | |
153 | | - | |
154 | | - | |
| 152 | + | |
155 | 153 | | |
156 | 154 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | 155 | | |
165 | 156 | | |
166 | 157 | | |
| |||
187 | 178 | | |
188 | 179 | | |
189 | 180 | | |
190 | | - | |
191 | 181 | | |
192 | | - | |
| 182 | + | |
193 | 183 | | |
194 | 184 | | |
195 | 185 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | 136 | | |
138 | 137 | | |
139 | 138 | | |
| |||
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 147 | + | |
| 148 | + | |
159 | 149 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 150 | + | |
| 151 | + | |
170 | 152 | | |
171 | 153 | | |
172 | 154 | | |
173 | 155 | | |
174 | 156 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 157 | + | |
179 | 158 | | |
180 | 159 | | |
181 | 160 | | |
182 | 161 | | |
183 | 162 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 163 | + | |
0 commit comments