@@ -34,23 +34,23 @@ public void setup() {
3434 @ Test
3535 public void testRemoteAttributesInheritance () {
3636 Span spanWithAppOnly = tracer .spanBuilder ("parent" ).startSpan ();
37- spanWithAppOnly .setAttribute (AwsAttributeKeys .AWS_REMOTE_APPLICATION , "testApplication " );
38- validateSpanAttributesInheritance (spanWithAppOnly , null , "testApplication " , null );
37+ spanWithAppOnly .setAttribute (AwsAttributeKeys .AWS_REMOTE_SERVICE , "testService " );
38+ validateSpanAttributesInheritance (spanWithAppOnly , null , "testService " , null );
3939
4040 Span spanWithOpOnly = tracer .spanBuilder ("parent" ).startSpan ();
4141 spanWithOpOnly .setAttribute (AwsAttributeKeys .AWS_REMOTE_OPERATION , "testOperation" );
4242 validateSpanAttributesInheritance (spanWithOpOnly , null , null , "testOperation" );
4343
4444 Span spanWithAppAndOp = tracer .spanBuilder ("parent" ).startSpan ();
45- spanWithAppAndOp .setAttribute (AwsAttributeKeys .AWS_REMOTE_APPLICATION , "testApplication " );
45+ spanWithAppAndOp .setAttribute (AwsAttributeKeys .AWS_REMOTE_SERVICE , "testService " );
4646 spanWithAppAndOp .setAttribute (AwsAttributeKeys .AWS_REMOTE_OPERATION , "testOperation" );
47- validateSpanAttributesInheritance (spanWithAppAndOp , null , "testApplication " , "testOperation" );
47+ validateSpanAttributesInheritance (spanWithAppAndOp , null , "testService " , "testOperation" );
4848 }
4949
5050 @ Test
5151 public void testOverrideRemoteAttributes () {
5252 Span parentSpan = tracer .spanBuilder ("parent" ).startSpan ();
53- parentSpan .setAttribute (AwsAttributeKeys .AWS_REMOTE_APPLICATION , "testApplication " );
53+ parentSpan .setAttribute (AwsAttributeKeys .AWS_REMOTE_SERVICE , "testService " );
5454 parentSpan .setAttribute (AwsAttributeKeys .AWS_REMOTE_OPERATION , "testOperation" );
5555
5656 Span transmitSpans1 = createNestedSpan (parentSpan , 2 );
@@ -120,11 +120,8 @@ private Span createNestedSpan(Span parentSpan, int depth) {
120120 }
121121
122122 private void validateSpanAttributesInheritance (
123- Span spanWithAppOnly ,
124- String localOperation ,
125- String remoteApplication ,
126- String remoteOperation ) {
127- ReadableSpan leafSpan = (ReadableSpan ) createNestedSpan (spanWithAppOnly , 10 );
123+ Span parentSpan , String localOperation , String remoteService , String remoteOperation ) {
124+ ReadableSpan leafSpan = (ReadableSpan ) createNestedSpan (parentSpan , 10 );
128125
129126 assertThat (leafSpan .getParentSpanContext ()).isNotNull ();
130127 assertThat (leafSpan .getName ()).isEqualTo ("child:1" );
@@ -134,11 +131,11 @@ private void validateSpanAttributesInheritance(
134131 } else {
135132 assertThat (leafSpan .getAttribute (AwsAttributeKeys .AWS_LOCAL_OPERATION )).isNull ();
136133 }
137- if (remoteApplication != null ) {
138- assertThat (leafSpan .getAttribute (AwsAttributeKeys .AWS_REMOTE_APPLICATION ))
139- .isEqualTo (remoteApplication );
134+ if (remoteService != null ) {
135+ assertThat (leafSpan .getAttribute (AwsAttributeKeys .AWS_REMOTE_SERVICE ))
136+ .isEqualTo (remoteService );
140137 } else {
141- assertThat (leafSpan .getAttribute (AwsAttributeKeys .AWS_REMOTE_APPLICATION )).isNull ();
138+ assertThat (leafSpan .getAttribute (AwsAttributeKeys .AWS_REMOTE_SERVICE )).isNull ();
142139 }
143140 if (remoteOperation != null ) {
144141 assertThat (leafSpan .getAttribute (AwsAttributeKeys .AWS_REMOTE_OPERATION ))
0 commit comments