-
-
Notifications
You must be signed in to change notification settings - Fork 372
Limit log batching to maximum 100 logs per batch #6768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…sentry-cocoa into fix/introduce-log-count-limit
|
@philipphofmann @noahsmartin I'm thinking if we should also drop individual log item > 1MB or prune large attributes. WDYT? |
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
Let's please cap this at 100, as in https://develop.sentry.dev/sdk/telemetry/logs/#buffering. |
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7273bf4 | 1202.42 ms | 1227.62 ms | 25.21 ms |
| 8d944ac | 1236.92 ms | 1254.91 ms | 18.00 ms |
| c6c1cb7 | 1235.71 ms | 1263.80 ms | 28.08 ms |
| a4c5ddc | 1239.61 ms | 1266.41 ms | 26.80 ms |
| 1bf44b4 | 1238.14 ms | 1275.45 ms | 37.31 ms |
| e0e5391 | 1191.21 ms | 1243.14 ms | 51.93 ms |
| 7dabfb9 | 1227.55 ms | 1243.94 ms | 16.39 ms |
| cbbc82c | 1246.43 ms | 1266.13 ms | 19.70 ms |
| aa96485 | 1215.37 ms | 1234.04 ms | 18.67 ms |
| 4f36ea5 | 1216.87 ms | 1246.34 ms | 29.47 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7273bf4 | 23.75 KiB | 908.01 KiB | 884.26 KiB |
| 8d944ac | 23.75 KiB | 919.69 KiB | 895.94 KiB |
| c6c1cb7 | 23.75 KiB | 928.15 KiB | 904.40 KiB |
| a4c5ddc | 23.75 KiB | 977.30 KiB | 953.55 KiB |
| 1bf44b4 | 23.75 KiB | 1021.20 KiB | 997.45 KiB |
| e0e5391 | 23.74 KiB | 1022.21 KiB | 998.46 KiB |
| 7dabfb9 | 23.75 KiB | 980.80 KiB | 957.05 KiB |
| cbbc82c | 23.75 KiB | 995.22 KiB | 971.47 KiB |
| aa96485 | 23.75 KiB | 874.46 KiB | 850.71 KiB |
| 4f36ea5 | 23.75 KiB | 995.08 KiB | 971.33 KiB |
philipphofmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
I also added this as recommendation to getsentry/sentry-docs#15513 |
📜 Description
This took some digging. I was testing sending logs in a tight loop and got rejected by the backend.
So I checked replay code. The issue is that it has 1000 logs MAX item limit,
which is not in any documentation we used when implementing the log batching.Its documented here (https://develop.sentry.dev/sdk/telemetry/logs/#buffering)Another issue I saw during testing is that envelopes persisted with > 1000 log items are being re-tried, so this is something that clients out there may be experiencing.
💡 Motivation and Context
Log envelopes dropped by the backend.
💚 How did you test it?
Unit tests. Sample app.
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.Closes #6770