@@ -265,10 +265,11 @@ func TestElasticSpanEnrich(t *testing.T) {
265265 }(),
266266 config : config .Enabled ().Span ,
267267 enrichedAttrs : map [string ]any {
268- AttributeSpanName : "testspan" ,
269- AttributeEventOutcome : "success" ,
270- AttributeServiceTargetName : "testsvc" ,
271- AttributeServiceTargetType : "" ,
268+ AttributeSpanName : "testspan" ,
269+ AttributeEventOutcome : "success" ,
270+ AttributeServiceTargetName : "testsvc" ,
271+ AttributeServiceTargetType : "" ,
272+ AttributeSpanDestinationResource : "testsvc" ,
272273 },
273274 },
274275 {
@@ -285,10 +286,11 @@ func TestElasticSpanEnrich(t *testing.T) {
285286 }(),
286287 config : config .Enabled ().Span ,
287288 enrichedAttrs : map [string ]any {
288- AttributeSpanName : "testspan" ,
289- AttributeEventOutcome : "success" ,
290- AttributeServiceTargetType : "http" ,
291- AttributeServiceTargetName : "testsvc" ,
289+ AttributeSpanName : "testspan" ,
290+ AttributeEventOutcome : "success" ,
291+ AttributeServiceTargetType : "http" ,
292+ AttributeServiceTargetName : "testsvc" ,
293+ AttributeSpanDestinationResource : "testsvc" ,
292294 },
293295 },
294296 {
@@ -311,10 +313,11 @@ func TestElasticSpanEnrich(t *testing.T) {
311313 }(),
312314 config : config .Enabled ().Span ,
313315 enrichedAttrs : map [string ]any {
314- AttributeSpanName : "testspan" ,
315- AttributeEventOutcome : "success" ,
316- AttributeServiceTargetType : "http" ,
317- AttributeServiceTargetName : "www.foo.bar:443" ,
316+ AttributeSpanName : "testspan" ,
317+ AttributeEventOutcome : "success" ,
318+ AttributeServiceTargetType : "http" ,
319+ AttributeServiceTargetName : "www.foo.bar:443" ,
320+ AttributeSpanDestinationResource : "testsvc" ,
318321 },
319322 },
320323 {
@@ -335,10 +338,11 @@ func TestElasticSpanEnrich(t *testing.T) {
335338 }(),
336339 config : config .Enabled ().Span ,
337340 enrichedAttrs : map [string ]any {
338- AttributeSpanName : "testspan" ,
339- AttributeEventOutcome : "success" ,
340- AttributeServiceTargetType : "http" ,
341- AttributeServiceTargetName : "www.foo.bar:443" ,
341+ AttributeSpanName : "testspan" ,
342+ AttributeEventOutcome : "success" ,
343+ AttributeServiceTargetType : "http" ,
344+ AttributeServiceTargetName : "www.foo.bar:443" ,
345+ AttributeSpanDestinationResource : "testsvc" ,
342346 },
343347 },
344348 {
@@ -355,10 +359,11 @@ func TestElasticSpanEnrich(t *testing.T) {
355359 }(),
356360 config : config .Enabled ().Span ,
357361 enrichedAttrs : map [string ]any {
358- AttributeSpanName : "testspan" ,
359- AttributeEventOutcome : "success" ,
360- AttributeServiceTargetType : "grpc" ,
361- AttributeServiceTargetName : "testsvc" ,
362+ AttributeSpanName : "testspan" ,
363+ AttributeEventOutcome : "success" ,
364+ AttributeServiceTargetType : "grpc" ,
365+ AttributeServiceTargetName : "testsvc" ,
366+ AttributeSpanDestinationResource : "testsvc" ,
362367 },
363368 },
364369 {
@@ -372,10 +377,11 @@ func TestElasticSpanEnrich(t *testing.T) {
372377 }(),
373378 config : config .Enabled ().Span ,
374379 enrichedAttrs : map [string ]any {
375- AttributeSpanName : "testspan" ,
376- AttributeEventOutcome : "success" ,
377- AttributeServiceTargetType : "xmlrpc" ,
378- AttributeServiceTargetName : "testsvc" ,
380+ AttributeSpanName : "testspan" ,
381+ AttributeEventOutcome : "success" ,
382+ AttributeServiceTargetType : "xmlrpc" ,
383+ AttributeServiceTargetName : "testsvc" ,
384+ AttributeSpanDestinationResource : "testsvc" ,
379385 },
380386 },
381387 {
@@ -391,10 +397,11 @@ func TestElasticSpanEnrich(t *testing.T) {
391397 }(),
392398 config : config .Enabled ().Span ,
393399 enrichedAttrs : map [string ]any {
394- AttributeSpanName : "testspan" ,
395- AttributeEventOutcome : "success" ,
396- AttributeServiceTargetType : "external" ,
397- AttributeServiceTargetName : "service.Test" ,
400+ AttributeSpanName : "testspan" ,
401+ AttributeEventOutcome : "success" ,
402+ AttributeServiceTargetType : "external" ,
403+ AttributeServiceTargetName : "service.Test" ,
404+ AttributeSpanDestinationResource : "testsvc" ,
398405 },
399406 },
400407 {
@@ -408,10 +415,11 @@ func TestElasticSpanEnrich(t *testing.T) {
408415 }(),
409416 config : config .Enabled ().Span ,
410417 enrichedAttrs : map [string ]any {
411- AttributeSpanName : "testspan" ,
412- AttributeEventOutcome : "success" ,
413- AttributeServiceTargetType : "kafka" ,
414- AttributeServiceTargetName : "testsvc" ,
418+ AttributeSpanName : "testspan" ,
419+ AttributeEventOutcome : "success" ,
420+ AttributeServiceTargetType : "kafka" ,
421+ AttributeServiceTargetName : "testsvc" ,
422+ AttributeSpanDestinationResource : "testsvc" ,
415423 },
416424 },
417425 {
@@ -425,10 +433,11 @@ func TestElasticSpanEnrich(t *testing.T) {
425433 }(),
426434 config : config .Enabled ().Span ,
427435 enrichedAttrs : map [string ]any {
428- AttributeSpanName : "testspan" ,
429- AttributeEventOutcome : "success" ,
430- AttributeServiceTargetType : "messaging" ,
431- AttributeServiceTargetName : "t1" ,
436+ AttributeSpanName : "testspan" ,
437+ AttributeEventOutcome : "success" ,
438+ AttributeServiceTargetType : "messaging" ,
439+ AttributeServiceTargetName : "t1" ,
440+ AttributeSpanDestinationResource : "testsvc/t1" ,
432441 },
433442 },
434443 {
@@ -443,10 +452,11 @@ func TestElasticSpanEnrich(t *testing.T) {
443452 }(),
444453 config : config .Enabled ().Span ,
445454 enrichedAttrs : map [string ]any {
446- AttributeSpanName : "testspan" ,
447- AttributeEventOutcome : "success" ,
448- AttributeServiceTargetType : "messaging" ,
449- AttributeServiceTargetName : "testsvc" ,
455+ AttributeSpanName : "testspan" ,
456+ AttributeEventOutcome : "success" ,
457+ AttributeServiceTargetType : "messaging" ,
458+ AttributeServiceTargetName : "testsvc" ,
459+ AttributeSpanDestinationResource : "testsvc/t1" ,
450460 },
451461 },
452462 {
@@ -467,10 +477,11 @@ func TestElasticSpanEnrich(t *testing.T) {
467477 }(),
468478 config : config .Enabled ().Span ,
469479 enrichedAttrs : map [string ]any {
470- AttributeSpanName : "testspan" ,
471- AttributeEventOutcome : "success" ,
472- AttributeServiceTargetType : "elasticsearch" ,
473- AttributeServiceTargetName : "testsvc" ,
480+ AttributeSpanName : "testspan" ,
481+ AttributeEventOutcome : "success" ,
482+ AttributeServiceTargetType : "elasticsearch" ,
483+ AttributeServiceTargetName : "testsvc" ,
484+ AttributeSpanDestinationResource : "testsvc" ,
474485 },
475486 },
476487 {
@@ -496,10 +507,11 @@ func TestElasticSpanEnrich(t *testing.T) {
496507 }(),
497508 config : config .Enabled ().Span ,
498509 enrichedAttrs : map [string ]any {
499- AttributeSpanName : "testspan" ,
500- AttributeEventOutcome : "success" ,
501- AttributeServiceTargetType : "cassandra" ,
502- AttributeServiceTargetName : "testsvc" ,
510+ AttributeSpanName : "testspan" ,
511+ AttributeEventOutcome : "success" ,
512+ AttributeServiceTargetType : "cassandra" ,
513+ AttributeServiceTargetName : "testsvc" ,
514+ AttributeSpanDestinationResource : "testsvc" ,
503515 },
504516 },
505517 } {
0 commit comments