File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
enrichments/trace/internal/elastic Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -294,10 +294,8 @@ func (s *spanEnrichmentContext) setServiceTarget(span ptrace.Span) {
294294 }
295295 }
296296
297- if targetType != "" {
297+ if targetType != "" || targetName != "" {
298298 span .Attributes ().PutStr (AttributeServiceTargetType , targetType )
299- }
300- if targetName != "" {
301299 span .Attributes ().PutStr (AttributeServiceTargetName , targetName )
302300 }
303301}
Original file line number Diff line number Diff line change @@ -268,6 +268,7 @@ func TestElasticSpanEnrich(t *testing.T) {
268268 AttributeSpanName : "testspan" ,
269269 AttributeEventOutcome : "success" ,
270270 AttributeServiceTargetName : "testsvc" ,
271+ AttributeServiceTargetType : "" ,
271272 },
272273 },
273274 {
You can’t perform that action at this time.
0 commit comments