@@ -118,6 +118,15 @@ func TestDefaultGatewayConfig(t *testing.T) {
118
118
"detectors" : []any {"gcp" , "ecs" , "ec2" , "azure" , "system" },
119
119
"override" : true ,
120
120
},
121
+ "resource/add_mode" : map [string ]any {
122
+ "attributes" : []any {
123
+ map [string ]any {
124
+ "action" : "insert" ,
125
+ "value" : "gateway" ,
126
+ "key" : "otelcol.service.mode" ,
127
+ },
128
+ },
129
+ },
121
130
},
122
131
"receivers" : map [string ]any {
123
132
"jaeger" : map [string ]any {
@@ -196,7 +205,7 @@ func TestDefaultGatewayConfig(t *testing.T) {
196
205
},
197
206
"metrics/internal" : map [string ]any {
198
207
"exporters" : []any {"signalfx/internal" },
199
- "processors" : []any {"memory_limiter" , "batch" , "resourcedetection/internal" },
208
+ "processors" : []any {"memory_limiter" , "batch" , "resourcedetection/internal" , "resource/add_mode" },
200
209
"receivers" : []any {"prometheus/internal" },
201
210
},
202
211
"traces" : map [string ]any {
@@ -313,6 +322,15 @@ func TestDefaultAgentConfig(t *testing.T) {
313
322
"detectors" : []any {"gcp" , "ecs" , "ec2" , "azure" , "system" },
314
323
"override" : true ,
315
324
},
325
+ "resource/add_mode" : map [string ]any {
326
+ "attributes" : []any {
327
+ map [string ]any {
328
+ "action" : "insert" ,
329
+ "value" : "agent" ,
330
+ "key" : "otelcol.service.mode" ,
331
+ },
332
+ },
333
+ },
316
334
},
317
335
"receivers" : map [string ]any {
318
336
"fluentforward" : map [string ]any {"endpoint" : fmt .Sprintf ("%s:8006" , ip )},
@@ -400,7 +418,7 @@ func TestDefaultAgentConfig(t *testing.T) {
400
418
},
401
419
"metrics/internal" : map [string ]any {
402
420
"exporters" : []any {"signalfx" },
403
- "processors" : []any {"memory_limiter" , "batch" , "resourcedetection" },
421
+ "processors" : []any {"memory_limiter" , "batch" , "resourcedetection" , "resource/add_mode" },
404
422
"receivers" : []any {"prometheus/internal" },
405
423
},
406
424
"traces" : map [string ]any {
0 commit comments