getsentry / getsentry/sentry-javascript

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

Ouverte
#22,760 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Improvement javascript Node.js Spans
Langage dominant
TypeScript
Étoiles
8.7k
Forks
1.8k
Merge moyen
1 j 17 h
PR mergées (30 j)
515

Description

### 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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

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

Évaluation

Stack technique
nodejs, typescript
Domaine
backend, frontend, testing
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

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