sentry icon indicating copy to clipboard operation
sentry copied to clipboard

feat(trace): Add timeouts to the trace query

Open wmak opened this issue 1 month ago • 1 comments

  • This adds a timeout to the queries for the trace endpoint so that the entire endpoint doesn't fail if one of the datasets takes too long to execute
  • Had to switch to multiprocessing because ThreadPoolExecutor doesn't have a good way to kill running tasks when they hit timeout? afaict it will wait until all tasks finish before letting you do anything

wmak avatar Dec 08 '25 22:12 wmak

Codecov Report

:x: Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review. :white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/snuba/trace.py 88.88% 2 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##           master   #104554       +/-   ##
============================================
+ Coverage   65.78%    80.54%   +14.76%     
============================================
  Files        9338      9346        +8     
  Lines      399925    400312      +387     
  Branches    25621     25621               
============================================
+ Hits       263087    322429    +59342     
+ Misses     136389     77434    -58955     
  Partials      449       449               

codecov[bot] avatar Dec 08 '25 23:12 codecov[bot]