getsentry / getsentry/sentry-javascript

Synthesize shell cache spans from RDC enumeration

Ouverte
#24,297 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
javascript
Langage dominant
TypeScript
Étoiles
8.7k
Forks
1.8k
Merge moyen
1 j 17 h
PR mergées (30 j)
523

Description

*Example:*

```
export default function Page() {
return (<> {/* 'use cache', baked into the static shell */}
}>);
}
```

A request serves the shell, including the cached header, from the [Resume Data Cache]() before any of our code runs. The handler instrumentation never fires. The trace shows `LiveStock` and nothing about the cached half of the page.

*Solves:* "was my cached content used, and how old was it?" for shell-served entries.

*Fix idea:* from code in the dynamic hole (the server-component wrapper), read the request work-unit store's `resumeDataCache`, enumerate its entries, and emit synthetic `cache.get` spans with key digest and item age. Research verified that enumeration works and read interception does not. Pages without a dynamic hole stay invisible. Document that limit instead of fighting it.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start in the server-component wrapper and trace how the request work-unit store exposes its resumeDataCache; confirm the cache entries can be enumerated without relying on read interception. Emit synthetic cache.get spans containing each key digest and item age, and document that pages without a dynamic hole remain invisible.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
nextjs, typescript
Domaine
observability
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
66/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.