getsentry / getsentry/sentry-javascript
[Span Streaming] Send `http.client` spans in server SDKs if there's no active parent span
- Vorherrschende Sprache
- TypeScript
- Sterne
- 8.7k
- Forks
- 1.8k
- Ø Merge
- 1 T. 17 Std.
- Gemergte PRs (30 T.)
- 515
Beschreibung
### 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
Beitragsleitfaden
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- nodejs, typescript
- Bereich
- backend, frontend, testing
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100