fix(otelTrace): 移除不必要的 trace.WithNewRoot 调用
- 删除 middleware.go 中创建追踪时的 trace.WithNewRoot 参数 - 保持原有的 span 种类为服务器端服务器类型 - 避免因新根追踪产生的潜在追踪链断裂问题
This commit is contained in:
@@ -52,7 +52,6 @@ func Middleware(ctx *beecontext.Context, next web.FilterFunc) {
|
||||
attribute.String("peer.hostname", req.Host),
|
||||
attribute.String("net.peer.ip", getClientIP(req)),
|
||||
),
|
||||
trace.WithNewRoot(),
|
||||
trace.WithSpanKind(trace.SpanKindServer),
|
||||
)
|
||||
if parentSpan.IsRecording() && parentSpan.SpanContext().IsSampled() {
|
||||
|
||||
Reference in New Issue
Block a user