@@ -80,10 +80,11 @@ func TestTranslator(t *testing.T) {
8080 "aws.remote.resource.identifier" ,
8181 "aws.remote.resource.type" ,
8282 },
83- "certificate_file_path" : "/ca/bundle" ,
84- "region" : "us-east-1" ,
85- "role_arn" : "global_arn" ,
86- "imds_retries" : 1 ,
83+ "certificate_file_path" : "/ca/bundle" ,
84+ "region" : "us-east-1" ,
85+ "role_arn" : "global_arn" ,
86+ "imds_retries" : 1 ,
87+ "transit_spans_in_otlp_format" : true ,
8788 "telemetry" : map [string ]any {
8889 "enabled" : true ,
8990 "include_metadata" : true ,
@@ -111,10 +112,11 @@ func TestTranslator(t *testing.T) {
111112 "aws.remote.resource.identifier" ,
112113 "aws.remote.resource.type" ,
113114 },
114- "certificate_file_path" : "/ca/bundle" ,
115- "region" : "us-east-1" ,
116- "role_arn" : "global_arn" ,
117- "imds_retries" : 1 ,
115+ "certificate_file_path" : "/ca/bundle" ,
116+ "region" : "us-east-1" ,
117+ "role_arn" : "global_arn" ,
118+ "imds_retries" : 1 ,
119+ "transit_spans_in_otlp_format" : true ,
118120 "telemetry" : map [string ]any {
119121 "enabled" : true ,
120122 "include_metadata" : true ,
@@ -142,10 +144,43 @@ func TestTranslator(t *testing.T) {
142144 "aws.remote.resource.identifier" ,
143145 "aws.remote.resource.type" ,
144146 },
145- "certificate_file_path" : "/ca/bundle" ,
146- "region" : "us-east-1" ,
147- "role_arn" : "global_arn" ,
148- "imds_retries" : 1 ,
147+ "certificate_file_path" : "/ca/bundle" ,
148+ "region" : "us-east-1" ,
149+ "role_arn" : "global_arn" ,
150+ "imds_retries" : 1 ,
151+ "transit_spans_in_otlp_format" : true ,
152+ "telemetry" : map [string ]any {
153+ "enabled" : true ,
154+ "include_metadata" : true ,
155+ },
156+ "middleware" : "agenthealth/traces" ,
157+ }),
158+ mode : config .ModeEC2 ,
159+ },
160+ "WithAppSignalsAndTransitOtlpOverrideFalse" : {
161+ input : map [string ]any {
162+ "traces" : map [string ]any {
163+ "traces_collected" : map [string ]any {
164+ "app_signals" : map [string ]any {},
165+ },
166+ "transit_spans_in_otlp_format" : false ,
167+ }},
168+ want : confmap .NewFromStringMap (map [string ]any {
169+ "indexed_attributes" : []string {
170+ "aws.local.service" ,
171+ "aws.local.operation" ,
172+ "aws.local.environment" ,
173+ "aws.remote.service" ,
174+ "aws.remote.operation" ,
175+ "aws.remote.environment" ,
176+ "aws.remote.resource.identifier" ,
177+ "aws.remote.resource.type" ,
178+ },
179+ "certificate_file_path" : "/ca/bundle" ,
180+ "region" : "us-east-1" ,
181+ "role_arn" : "global_arn" ,
182+ "imds_retries" : 1 ,
183+ "transit_spans_in_otlp_format" : false ,
149184 "telemetry" : map [string ]any {
150185 "enabled" : true ,
151186 "include_metadata" : true ,
0 commit comments