|
|
@ -37,11 +37,12 @@ func (r *report) WriteSpan(raw *trace.Span) (err error) { |
|
|
|
ID: spanID, |
|
|
|
ID: spanID, |
|
|
|
ParentID: &parentID, |
|
|
|
ParentID: &parentID, |
|
|
|
}, |
|
|
|
}, |
|
|
|
Name: raw.Name(), |
|
|
|
Name: raw.OperationName(), |
|
|
|
Timestamp: raw.StartTime(), |
|
|
|
Timestamp: raw.StartTime(), |
|
|
|
Duration: raw.Duration(), |
|
|
|
Duration: raw.Duration(), |
|
|
|
Tags: make(map[string]string, len(tags)+len(logs)), |
|
|
|
Tags: make(map[string]string, len(tags)+len(logs)), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
span.LocalEndpoint = &model.Endpoint{ServiceName: raw.ServiceName()} |
|
|
|
for _, tag := range tags { |
|
|
|
for _, tag := range tags { |
|
|
|
switch tag.Key { |
|
|
|
switch tag.Key { |
|
|
|
case trace.TagSpanKind: |
|
|
|
case trace.TagSpanKind: |
|
|
@ -55,8 +56,6 @@ func (r *report) WriteSpan(raw *trace.Span) (err error) { |
|
|
|
case "consumer": |
|
|
|
case "consumer": |
|
|
|
span.Kind = model.Consumer |
|
|
|
span.Kind = model.Consumer |
|
|
|
} |
|
|
|
} |
|
|
|
case trace.TagPeerService: |
|
|
|
|
|
|
|
span.LocalEndpoint = &model.Endpoint{ServiceName: tag.Value.(string)} |
|
|
|
|
|
|
|
default: |
|
|
|
default: |
|
|
|
v, ok := tag.Value.(string) |
|
|
|
v, ok := tag.Value.(string) |
|
|
|
if ok { |
|
|
|
if ok { |
|
|
|