+
Skip to content

Conversation

lcian
Copy link
Member

@lcian lcian commented Sep 23, 2025

📜 Description

  • Handle RejectedExecutionException on submit where it was previously unhandled
  • Log the failure with WARNING level everywhere
  • Change the signature of methods in SentryExecutorService to throws RejectedExecutionException (not sure if this is effective because it's a RuntimeException anyway)
    • An alternative would be to handle the exception e.g. in the submit method itself of SentryExecutorService, but then we wouldn't throw it to the caller which can log a more specific message
  • Change deviceInfoUtil to be nullable in DefaultAndroidEventProcessor. Upon accessing it, if it's null it will still trigger an NPE and log things like options.getLogger().log(SentryLevel.ERROR, "Failed to retrieve device info", e);
    • Perhaps here it's better to check for null instead of relying on the NPE to avoid the performance hit of the exception throwing and handling flow, to the expense of some DRYness
      -> ended up changing it as described (with null checks)

💡 Motivation and Context

Closes: #4660
Closes: JAVA-144

💚 How did you test it?

All tests pass

📝 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

Copy link

linear bot commented Sep 23, 2025

Copy link
Contributor

🚨 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/QueuedThreadPoolExecutor.java

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Sep 23, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 327.15 ms 389.48 ms 62.33 ms
Size 1.58 MiB 2.10 MiB 533.40 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
c8125f3 397.65 ms 485.14 ms 87.49 ms
ee747ae 386.94 ms 431.43 ms 44.49 ms
23d6b12 354.10 ms 408.38 ms 54.28 ms
d217708 409.83 ms 474.72 ms 64.89 ms
d217708 411.22 ms 430.86 ms 19.63 ms
ee747ae 400.46 ms 423.61 ms 23.15 ms
17a0955 372.53 ms 446.70 ms 74.17 ms
3d205d0 352.15 ms 432.53 ms 80.38 ms
1df7eb6 397.04 ms 429.64 ms 32.60 ms
b750b96 408.98 ms 480.32 ms 71.34 ms

App size

Revision Plain With Sentry Diff
c8125f3 1.58 MiB 2.10 MiB 532.32 KiB
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
23d6b12 1.58 MiB 2.10 MiB 532.31 KiB
d217708 1.58 MiB 2.10 MiB 532.97 KiB
d217708 1.58 MiB 2.10 MiB 532.97 KiB
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
17a0955 1.58 MiB 2.10 MiB 533.20 KiB
3d205d0 1.58 MiB 2.10 MiB 532.97 KiB
1df7eb6 1.58 MiB 2.10 MiB 532.97 KiB
b750b96 1.58 MiB 2.10 MiB 533.19 KiB

Previous results on branch: lcian/handle-rejected-execution-exception

Startup times

Revision Plain With Sentry Diff
922c01f 374.10 ms 411.06 ms 36.96 ms
b8c9ebc 395.56 ms 451.02 ms 55.46 ms

App size

Revision Plain With Sentry Diff
922c01f 1.58 MiB 2.10 MiB 533.33 KiB
b8c9ebc 1.58 MiB 2.10 MiB 533.37 KiB

Copy link
Contributor

🚨 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/QueuedThreadPoolExecutor.java

cursor[bot]

This comment was marked as outdated.

Copy link
Member

@markushi markushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

github-actions bot commented Sep 25, 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/QueuedThreadPoolExecutor.java

cursor[bot]

This comment was marked as outdated.

Copy link
Member

@adinauer adinauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this!

Copy link
Contributor

github-actions bot commented Sep 25, 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/QueuedThreadPoolExecutor.java

@lcian lcian enabled auto-merge (squash) September 25, 2025 12:18
Copy link
Contributor

github-actions bot commented Sep 25, 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/QueuedThreadPoolExecutor.java

cursor[bot]

This comment was marked as outdated.

@lcian lcian disabled auto-merge September 25, 2025 12:31
Copy link
Contributor

github-actions bot commented Sep 26, 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/QueuedThreadPoolExecutor.java

Copy link
Contributor

github-actions bot commented Sep 26, 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/QueuedThreadPoolExecutor.java

@lcian lcian enabled auto-merge (squash) September 26, 2025 08:05
@lcian lcian merged commit 818a27d into main Sep 26, 2025
45 checks passed
@lcian lcian deleted the lcian/handle-rejected-execution-exception branch September 26, 2025 08:22
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.

RejectedExecutionException sometimes is not handled for ISentryExecutorService.submit
4 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载