|
|
@@ -199,6 +199,14 @@ func (t *Trace) TraceEnd(r *l7.RequestData) {
|
|
|
if r.ParentSpanContext.SpanIdFrom != "0000000000000000" {
|
|
|
t.span.SetAttributes(attribute.String("server.span_id_from", r.ParentSpanContext.SpanIdFrom))
|
|
|
}
|
|
|
+ // klog.Debugf("r.ParentSpanContext.TypeFrom tpp %s", r.ParentSpanContext.TypeFrom)
|
|
|
+ if r.ParentSpanContext.TypeFrom == "10" {
|
|
|
+ t.span.SetAttributes(attribute.String("server.type_from", "SDK"))
|
|
|
+ t.span.SetAttributes(attribute.String("server.app_id_from", "-1"))
|
|
|
+ t.span.SetAttributes(attribute.String("server.span_id_from", r.ParentSpanContext.TraceIdFrom))
|
|
|
+ t.span.SetAttributes(attribute.String("server.instance_id_from", "-1"))
|
|
|
+ t.span.SetAttributes(attribute.String("server.call_id", "-1"))
|
|
|
+ }
|
|
|
// for _, v := range t.stack {
|
|
|
// fmt.Printf("TraceEndTraceEndTraceEnd%s\n", v)
|
|
|
// }
|
|
|
@@ -244,6 +252,16 @@ 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"))
|
|
|
+ attr = append(attr, attribute.String("server.app_id_from", "-1"))
|
|
|
+ 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"))
|
|
|
+ }
|
|
|
+
|
|
|
attr = append(attr, attribute.String("server.src_addr", r.DAddr.String()))
|
|
|
attr = append(attr, attribute.String("server.dst_addr", r.SAddr.String()))
|
|
|
klog.Debugf("TraceEndEvent SAddr.String %s", r.SAddr.String())
|