getsentry / getsentry/sentry-javascript

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

未关闭
#22,760 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Improvement javascript Node.js Spans
主要语言
TypeScript
星标
8.7k
派生
1.8k
平均合并
1 天 17 小时
30 天内合并 PR
515

描述

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

贡献指南

打开贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
nodejs, typescript
领域
backend, frontend, testing
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。