Skip to content

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Dec 3, 2025

📜 Description

Envelopes are now discarded on a 4xx or 5xx response instead of retrying them.

  • For 4xx it's most likely an SDK (e.g. incorrect serialization) or envelope problem (e.g. too large) where retry does not make sense.
  • We decided to also not retry on a 5xx response in order not to take down Sentry by accumulating lots of envelopes in case of an outage where after restoring functionality Sentry is hit by too many requests.

💡 Motivation and Context

Fixes #4921
Fixes #4936

💚 How did you test it?

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry/src/main/java/io/sentry/transport/AsyncHttpTransport.java

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 318.68 ms 394.94 ms 76.26 ms
Size 1.58 MiB 2.13 MiB 558.75 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
f634d01 359.58 ms 433.88 ms 74.30 ms
9fbb112 401.87 ms 515.87 ms 114.00 ms
d5a29b6 298.62 ms 391.78 ms 93.16 ms
bbc35bb 298.53 ms 372.17 ms 73.64 ms
b3d8889 420.46 ms 453.71 ms 33.26 ms
a5ab36f 320.47 ms 389.77 ms 69.30 ms
ee747ae 405.43 ms 485.70 ms 80.28 ms
951caf7 323.66 ms 392.82 ms 69.16 ms
b6702b0 395.86 ms 409.98 ms 14.12 ms
27d7cf8 369.82 ms 422.62 ms 52.80 ms

App size

Revision Plain With Sentry Diff
f634d01 1.58 MiB 2.10 MiB 533.40 KiB
9fbb112 1.58 MiB 2.11 MiB 539.18 KiB
d5a29b6 1.58 MiB 2.12 MiB 549.37 KiB
bbc35bb 1.58 MiB 2.12 MiB 553.01 KiB
b3d8889 1.58 MiB 2.10 MiB 535.07 KiB
a5ab36f 1.58 MiB 2.12 MiB 555.26 KiB
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
951caf7 1.58 MiB 2.13 MiB 558.77 KiB
b6702b0 1.58 MiB 2.12 MiB 551.79 KiB
27d7cf8 1.58 MiB 2.12 MiB 549.42 KiB

Previous results on branch: feat/do-not-retry-4xx-and-5xx

Startup times

Revision Plain With Sentry Diff
3819f19 321.95 ms 383.09 ms 61.14 ms

App size

Revision Plain With Sentry Diff
3819f19 1.58 MiB 2.13 MiB 558.75 KiB

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry/src/main/java/io/sentry/transport/AsyncHttpTransport.java

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry/src/main/java/io/sentry/transport/AsyncHttpTransport.java

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry/src/main/java/io/sentry/transport/AsyncHttpTransport.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Built-in monitoring & alerting for stuck / unprocessed envelopes fix: Don't retry sending envelopes when getting 4xx or 5xx

2 participants