We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
DjangoIntegration(cache_spans=True) traces cache.set() and cache.get(), but cache.add() emits no cache span.
DjangoIntegration(cache_spans=True)
cache.set()
cache.get()
cache.add()
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.
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().
cache.put
Expected: cache.add() should be traced like the other cache write methods.
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.
add
Problem
DjangoIntegration(cache_spans=True)tracescache.set()andcache.get(), butcache.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
Actual: no
cache.putspan forcache.add().Expected:
cache.add()should be traced like the other cache write methods.Notes
I verified locally that
cache.set()emits a span whilecache.add()does not, and a targeted fix is just to instrumentaddas a cache write.