Django cache.add operations do not emit cache spans
@immanuwell ci sta già lavorando.
Dal 26/5/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Problem
DjangoIntegration(cache_spans=True) traces cache.set() and cache.get(), but cache.add() emits no cache span.
cache.add() is a normal Django cache write API, so this shows up in practice for apps that use add-on-miss / write-if-absent flows.
Repro
from django.core.cache import cache
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
sentry_sdk.init(
integrations=[DjangoIntegration(cache_spans=True)],
traces_sample_rate=1.0,
)
with sentry_sdk.start_transaction(name="t", op="test"):
cache.add("k", "value")
Actual: no cache.put span for cache.add().
Expected: cache.add() should be traced like the other cache write methods.
Notes
I verified locally that cache.set() emits a span while cache.add() does not, and a targeted fix is just to instrument add as a cache write.
- Lingua principale
- Python
- Stelle
- 2.2k
- Fork
- 672
- Merge medio
- 1g 13m
- PR unite (30g)
- 212
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/sentry-python
-
Waiting for: Product Owner
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-python#7543 · 1 commento ·
-
Python
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getsentry/sentry-python#6992 · 1 commento ·
-
Improvement Python
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
getsentry/sentry-python#6970 · 1 commento ·
-
Bug Python
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
getsentry/sentry-python#6504 · 1 commento ·
-
Improvement Python Spans
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
getsentry/sentry-python#5833 · 1 commento ·
Tutte le issue di getsentry/sentry-python
Issue simili
-
documentation help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
simonw/sqlite-utils#872 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100