@@ -84,6 +84,9 @@ describe('SNS - v2', () => {
8484 expect (
8585 publishSpan . attributes [ SemanticAttributes . MESSAGING_DESTINATION ]
8686 ) . toBe ( topicName ) ;
87+ expect ( publishSpan . attributes [ 'messaging.destination.name' ] ) . toBe (
88+ fakeARN
89+ ) ;
8790 expect ( publishSpan . attributes [ SemanticAttributes . RPC_METHOD ] ) . toBe (
8891 'Publish'
8992 ) ;
@@ -111,6 +114,9 @@ describe('SNS - v2', () => {
111114 expect (
112115 publishSpan . attributes [ SemanticAttributes . MESSAGING_DESTINATION ]
113116 ) . toBe ( PhoneNumber ) ;
117+ expect ( publishSpan . attributes [ 'messaging.destination.name' ] ) . toBe (
118+ PhoneNumber
119+ ) ;
114120 } ) ;
115121
116122 it ( 'inject context propagation' , async ( ) => {
@@ -159,6 +165,9 @@ describe('SNS - v2', () => {
159165 expect (
160166 createTopicSpan . attributes [ SemanticAttributes . MESSAGING_DESTINATION ]
161167 ) . toBeUndefined ( ) ;
168+ expect (
169+ createTopicSpan . attributes [ 'messaging.destination.name' ]
170+ ) . toBeUndefined ( ) ;
162171 expect ( createTopicSpan . kind ) . toBe ( SpanKind . CLIENT ) ;
163172 } ) ;
164173 } ) ;
@@ -186,9 +195,11 @@ describe('SNS - v3', () => {
186195 describe ( 'publish' , ( ) => {
187196 it ( 'topic arn' , async ( ) => {
188197 const topicV3Name = 'dummy-sns-v3-topic' ;
198+ const topicV3ARN = `arn:aws:sns:us-east-1:000000000:${ topicV3Name } ` ;
199+
189200 await sns . publish ( {
190201 Message : 'sns message' ,
191- TopicArn : `arn:aws:sns:us-east-1:000000000: ${ topicV3Name } ` ,
202+ TopicArn : topicV3ARN ,
192203 } ) ;
193204
194205 const publishSpans = getTestSpans ( ) . filter (
@@ -203,6 +214,9 @@ describe('SNS - v3', () => {
203214 expect (
204215 publishSpan . attributes [ SemanticAttributes . MESSAGING_DESTINATION ]
205216 ) . toBe ( topicV3Name ) ;
217+ expect ( publishSpan . attributes [ 'messaging.destination.name' ] ) . toBe (
218+ topicV3ARN
219+ ) ;
206220 expect ( publishSpan . attributes [ SemanticAttributes . RPC_METHOD ] ) . toBe (
207221 'Publish'
208222 ) ;
0 commit comments