Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Dec 5, 2024

I was testing Spotlight with Sentry and realized things started to get slow and crashy. It looks like sometimes args is just an empty array on cache's _instruments_call causing lots of exceptions being thrown. This patch fixes that with explicit length checks and also adds a note for the missing instrumentation for get_or_set method. This might be related to #2122 and #3300.

I was testing Spotlight with Sentry and realized things started to get slow and crashy. It looks like sometimes `args` is just an empty array on cache's `_instruments_call` causing lots of exceptions being thrown. This patch fixes that with explicit length checks and also adds a note for the missing instrumentation for `get_or_set` method. This might be related to #2122 and #3300.
@BYK BYK requested review from antonpirker and sentrivana December 5, 2024 13:47
Copy link
Contributor

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@codecov
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.92%. Comparing base (5891717) to head (5ea33a4).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sentry_sdk/integrations/django/caching.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3855       +/-   ##
===========================================
+ Coverage   66.07%   79.92%   +13.84%     
===========================================
  Files         137      137               
  Lines       15403    15404        +1     
  Branches     2618     2620        +2     
===========================================
+ Hits        10177    12311     +2134     
+ Misses       4346     2221     -2125     
+ Partials      880      872        -8     
Files with missing lines Coverage Δ
sentry_sdk/integrations/django/caching.py 92.92% <66.66%> (-0.95%) ⬇️

... and 40 files with indirect coverage changes

@BYK BYK enabled auto-merge (squash) December 5, 2024 13:56
@BYK BYK merged commit 31fdcfa into master Dec 5, 2024
136 checks passed
@BYK BYK deleted the byk/fix/cache-instrumentation-errors branch December 5, 2024 13:58
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.

4 participants