|
|
@@ -161,6 +161,7 @@ func (t *Trace) CreateRootSpan(traceId uint64) {
|
|
|
t.setSpan(span)
|
|
|
}
|
|
|
|
|
|
+// Deprecated: use TraceStartEvent instead.
|
|
|
func (t *Trace) TraceStart(method, path string, status l7.Status, duration time.Duration) {
|
|
|
if t == nil || method == "" {
|
|
|
return
|
|
|
@@ -173,6 +174,7 @@ func (t *Trace) TraceStart(method, path string, status l7.Status, duration time.
|
|
|
)
|
|
|
}
|
|
|
|
|
|
+// Deprecated: use TraceEndEvent instead.
|
|
|
func (t *Trace) TraceEnd(r *l7.RequestData) {
|
|
|
if t == nil {
|
|
|
return
|
|
|
@@ -252,7 +254,6 @@ func (t *Trace) TraceEndEvent(r *l7.RequestData) {
|
|
|
//t.span.SetAttributes(attribute.String("server.span_id_from", r.ParentSpanContext.SpanIdFrom))
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// klog.Debugf("r.ParentSpanContext.TypeFrom event tpp %s", r.ParentSpanContext.TypeFrom)
|
|
|
if r.ParentSpanContext.TypeFrom == "10" {
|
|
|
attr = append(attr, attribute.String("server.type_from", "SDK"))
|
|
|
@@ -260,6 +261,8 @@ func (t *Trace) TraceEndEvent(r *l7.RequestData) {
|
|
|
attr = append(attr, attribute.String("server.span_id_from", r.ParentSpanContext.TraceIdFrom))
|
|
|
attr = append(attr, attribute.String("server.instance_id_from", "-1"))
|
|
|
attr = append(attr, attribute.String("server.call_id", "-1"))
|
|
|
+ } else if r.ParentSpanContext.TypeFrom == "02" {
|
|
|
+ attr = append(attr, attribute.String("server.type_from", "Nodejs"))
|
|
|
}
|
|
|
|
|
|
attr = append(attr, attribute.String("server.src_addr", r.DAddr.String()))
|