getsentry / getsentry/sentry-javascript

[Span Streaming] Send `http.client` spans in server SDKs if there's no active parent span

Aperta
#22,760 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Improvement javascript Node.js Spans
Lingua principale
TypeScript
Stelle
8.7k
Fork
1.8k
Merge medio
1g 17h
PR unite (30g)
515

Descrizione

### Description

If span streaming is enabled (by default in v11), let's align Node/Server behaviour with browser and always send a `http.client` span on outgoing requests. In practise, this should make little to no difference for servers but rather only in a "Sentry used in a script" scenario, or in heavily manually instrumented similar scenarios.

Concrete steps to take care of:
- Adjust `onlyIfParent` option, to only gate http.client spans when transaction mode is enabled
- add Tests for the following scenarios:
- tracing enabled, no parent span, fetch/http request -> sends a new span
- tracing enabled, no parent span, fetch/http request -> propagates sampling decision
- tracing not set (tracing without performance), no parent span -> propagates deferred (no) sampling decision
- ensure these scenarios are also tested in browser. if not, add browser tests

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by locating the server SDK handling of the `onlyIfParent` option and the fetch/http instrumentation entry points. Review existing browser tests, then add coverage for no-parent requests with tracing enabled, disabled tracing, and sampling propagation. Done means the server scenarios behave like the browser and equivalent browser coverage exists.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
nodejs, typescript
Ambito
backend, frontend, testing
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.