Skip to content

Commit 526c5c2

Browse files
amarzialidevflow.devflow-routing-intake
andauthored
Add manual service name source (#10704)
Add service name source manual (m) Fix tests and add when service name is set with a builder fixes fix tests Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>
1 parent 7573a5f commit 526c5c2

File tree

19 files changed

+84
-81
lines changed

19 files changed

+84
-81
lines changed

dd-java-agent/instrumentation/axis2-1.3/src/test/groovy/datadog/trace/instrumentation/axis2/AxisEngineTest.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ class AxisEngineTest extends InstrumentationSpecification {
388388
}
389389
topLevel parentSpan == null
390390
tags {
391-
serviceNameSource null
391+
serviceNameSource "m"
392392
defaultTags()
393393
}
394394
}
@@ -415,7 +415,7 @@ class AxisEngineTest extends InstrumentationSpecification {
415415
"error.stack" String
416416
}
417417
"$Tags.COMPONENT" "axis2"
418-
serviceNameSource null
418+
serviceNameSource "m"
419419
defaultTags()
420420
}
421421
}

dd-java-agent/instrumentation/axis2-1.3/src/test/groovy/datadog/trace/instrumentation/axis2/AxisTransportForkedTest.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class AxisTransportForkedTest extends InstrumentationSpecification {
134134
topLevel parentSpan == null
135135
tags {
136136
// manual tracing
137-
serviceNameSource null
137+
serviceNameSource "m"
138138
defaultTags()
139139
}
140140
}
@@ -161,7 +161,7 @@ class AxisTransportForkedTest extends InstrumentationSpecification {
161161
"error.stack" String
162162
}
163163
"$Tags.COMPONENT" "axis2"
164-
serviceNameSource null
164+
serviceNameSource "m"
165165
defaultTags()
166166
}
167167
}
@@ -200,7 +200,7 @@ class AxisTransportForkedTest extends InstrumentationSpecification {
200200
"$Tags.HTTP_STATUS" 200
201201
"$Tags.PEER_HOSTNAME" "my-host"
202202
"$Tags.PEER_PORT" 8080
203-
serviceNameSource null
203+
serviceNameSource "m"
204204
defaultTags()
205205
}
206206
}

dd-java-agent/instrumentation/datadog/tracing/trace-annotation/src/test/groovy/TraceAnnotationNewOpNameForkedTest.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class TraceAnnotationNewOpNameForkedTest extends InstrumentationSpecification {
2727
errored false
2828
tags {
2929
"$Tags.COMPONENT" "trace"
30-
serviceNameSource null
30+
serviceNameSource "m"
3131
defaultTags()
3232
}
3333
}
@@ -50,7 +50,7 @@ class TraceAnnotationNewOpNameForkedTest extends InstrumentationSpecification {
5050
errored false
5151
tags {
5252
"$Tags.COMPONENT" "trace"
53-
serviceNameSource null
53+
serviceNameSource "m"
5454
defaultTags()
5555
}
5656
}

dd-java-agent/instrumentation/datadog/tracing/trace-annotation/src/test/groovy/TraceAnnotationsAsyncTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TraceAnnotationsAsyncTest extends InstrumentationSpecification {
3131
resourceName "SayTracedHello.sayHelloFuture"
3232
operationName "trace.annotation"
3333
tags {
34-
serviceNameSource null
34+
serviceNameSource "m"
3535
defaultTags()
3636
"$Tags.COMPONENT" "trace"
3737
}

dd-java-agent/instrumentation/datadog/tracing/trace-annotation/src/test/groovy/TraceAnnotationsTest.groovy

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
2626
errored false
2727
tags {
2828
"$Tags.COMPONENT" "trace"
29-
serviceNameSource null
29+
serviceNameSource "m"
3030
defaultTags()
3131
}
3232
}
@@ -51,7 +51,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
5151
errored false
5252
tags {
5353
"$Tags.COMPONENT" "trace"
54-
serviceNameSource null
54+
serviceNameSource "m"
5555
defaultTags()
5656
}
5757
}
@@ -75,7 +75,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
7575
errored false
7676
tags {
7777
"$Tags.COMPONENT" "trace"
78-
serviceNameSource null
78+
serviceNameSource "m"
7979
defaultTags()
8080
}
8181
}
@@ -100,7 +100,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
100100
errored false
101101
tags {
102102
"$Tags.COMPONENT" "trace"
103-
serviceNameSource null
103+
serviceNameSource "m"
104104
defaultTags()
105105
}
106106
}
@@ -123,7 +123,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
123123
errored false
124124
tags {
125125
"$Tags.COMPONENT" "trace"
126-
serviceNameSource null
126+
serviceNameSource "m"
127127
defaultTags()
128128
}
129129
}
@@ -135,7 +135,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
135135
errored false
136136
tags {
137137
"$Tags.COMPONENT" "trace"
138-
serviceNameSource null
138+
serviceNameSource "m"
139139
defaultTags()
140140
}
141141
}
@@ -147,7 +147,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
147147
errored false
148148
tags {
149149
"$Tags.COMPONENT" "trace"
150-
serviceNameSource null
150+
serviceNameSource "m"
151151
defaultTags()
152152
}
153153
}
@@ -170,7 +170,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
170170
errored false
171171
tags {
172172
"$Tags.COMPONENT" "trace"
173-
serviceNameSource null
173+
serviceNameSource "m"
174174
defaultTags()
175175
}
176176
}
@@ -182,7 +182,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
182182
errored false
183183
tags {
184184
"$Tags.COMPONENT" "trace"
185-
serviceNameSource null
185+
serviceNameSource "m"
186186
defaultTags()
187187
}
188188
}
@@ -194,7 +194,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
194194
errored false
195195
tags {
196196
"$Tags.COMPONENT" "trace"
197-
serviceNameSource null
197+
serviceNameSource "m"
198198
defaultTags()
199199
}
200200
}
@@ -217,7 +217,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
217217
errored false
218218
tags {
219219
"$Tags.COMPONENT" "trace"
220-
serviceNameSource null
220+
serviceNameSource "m"
221221
defaultTags()
222222
}
223223
}
@@ -229,7 +229,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
229229
errored false
230230
tags {
231231
"$Tags.COMPONENT" "trace"
232-
serviceNameSource null
232+
serviceNameSource "m"
233233
defaultTags()
234234
}
235235
}
@@ -241,7 +241,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
241241
errored false
242242
tags {
243243
"$Tags.COMPONENT" "trace"
244-
serviceNameSource null
244+
serviceNameSource "m"
245245
defaultTags()
246246
}
247247
}
@@ -267,7 +267,6 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
267267
errored true
268268
tags {
269269
"$Tags.COMPONENT" "trace"
270-
serviceNameSource null
271270
errorTags(error.class)
272271
defaultTags()
273272
}
@@ -294,7 +293,6 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
294293
errored true
295294
tags {
296295
"$Tags.COMPONENT" "trace"
297-
serviceNameSource null
298296
errorTags(error.class)
299297
defaultTags()
300298
}
@@ -316,7 +314,6 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
316314
operationName "trace.annotation"
317315
tags {
318316
"$Tags.COMPONENT" "trace"
319-
serviceNameSource null
320317
defaultTags()
321318
}
322319
}
@@ -342,7 +339,6 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
342339
operationName "trace.annotation"
343340
tags {
344341
"$Tags.COMPONENT" "trace"
345-
serviceNameSource null
346342
defaultTags()
347343
}
348344
}
@@ -352,7 +348,6 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
352348
operationName "trace.annotation"
353349
tags {
354350
"$Tags.COMPONENT" "trace"
355-
serviceNameSource null
356351
defaultTags()
357352
}
358353
}
@@ -390,7 +385,6 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
390385
errored false
391386
tags {
392387
"$Tags.COMPONENT" "trace"
393-
serviceNameSource null
394388
defaultTags()
395389
}
396390
}
@@ -403,7 +397,6 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
403397
errored false
404398
tags {
405399
"$Tags.COMPONENT" "trace"
406-
serviceNameSource null
407400
defaultTags()
408401
}
409402
}
@@ -441,7 +434,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
441434
measured false
442435
tags {
443436
"$Tags.COMPONENT" "trace"
444-
serviceNameSource null
437+
serviceNameSource "m"
445438
defaultTags()
446439
}
447440
}
@@ -454,7 +447,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
454447
measured true
455448
tags {
456449
"$Tags.COMPONENT" "trace"
457-
serviceNameSource null
450+
serviceNameSource "m"
458451
defaultTags()
459452
}
460453
}
@@ -467,7 +460,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
467460
measured false
468461
tags {
469462
"$Tags.COMPONENT" "trace"
470-
serviceNameSource null
463+
serviceNameSource "m"
471464
defaultTags()
472465
}
473466
}
@@ -504,7 +497,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
504497
errored false
505498
tags {
506499
"$Tags.COMPONENT" "trace"
507-
serviceNameSource null
500+
serviceNameSource "m"
508501
defaultTags()
509502
}
510503
}
@@ -516,7 +509,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
516509
errored false
517510
tags {
518511
"$Tags.COMPONENT" "trace"
519-
serviceNameSource null
512+
serviceNameSource "m"
520513
defaultTags()
521514
}
522515
}
@@ -530,7 +523,7 @@ class TraceAnnotationsTest extends InstrumentationSpecification {
530523
errored false
531524
tags {
532525
"$Tags.COMPONENT" "trace"
533-
serviceNameSource null
526+
serviceNameSource "m"
534527
defaultTags()
535528
}
536529
}

dd-java-agent/instrumentation/opentelemetry/opentelemetry-1.4/src/test/groovy/OpenTelemetry14ConventionsTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class OpenTelemetry14ConventionsTest extends InstrumentationSpecification {
129129
serviceName "my-service"
130130
spanType "http"
131131
tags {
132-
serviceNameSource null //service name was manually set
132+
serviceNameSource "m" //service name was manually set
133133
defaultTags()
134134
"$SPAN_KIND" "$SPAN_KIND_INTERNAL"
135135
}

dd-java-agent/instrumentation/opentelemetry/opentelemetry-annotations-1.20/src/test/groovy/WithSpanAnnotationTest.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class WithSpanAnnotationTest extends InstrumentationSpecification {
2828
parent()
2929
errored false
3030
tags {
31-
serviceNameSource null // manual service name
31+
serviceNameSource "m" // manual service name
3232
defaultTags()
3333
"$Tags.COMPONENT" "opentelemetry"
3434
"$Tags.SPAN_KIND" "internal"
@@ -52,7 +52,7 @@ class WithSpanAnnotationTest extends InstrumentationSpecification {
5252
parent()
5353
errored false
5454
tags {
55-
serviceNameSource null // manual service name
55+
serviceNameSource "m" // manual service name
5656
defaultTags()
5757
"$Tags.COMPONENT" "opentelemetry"
5858
"$Tags.SPAN_KIND" "internal"

dd-java-agent/instrumentation/tomcat/tomcat-5.5/src/latestDepTest/groovy/TomcatServletTest.groovy

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,7 @@ class TomcatServletEnvEntriesTagTest extends TomcatServletTest {
279279

280280
@Override
281281
Map<String, Serializable> expectedExtraServerTags(ServerEndpoint endpoint) {
282-
super.expectedExtraServerTags(endpoint) + ["custom-tag": "custom-value", "_dd.svc_src": null] as Map<String, Serializable>
283-
}
284-
285-
@Override
286-
Map<String, Serializable> expectedExtraControllerTags(ServerEndpoint endpoint) {
287-
super.expectedExtraControllerTags(endpoint) + ["_dd.svc_src": null] as Map<String, Serializable>
282+
super.expectedExtraServerTags(endpoint) + ["custom-tag": "custom-value"] as Map<String, Serializable>
288283
}
289284

290285
@Override

dd-java-agent/instrumentation/wildfly-9.0/src/test/groovy/WildFlyForkedTest.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ class WildFlyForkedTest extends WithHttpServer<EmbeddedWildfly> implements Testi
7777
"$InstrumentationTags.SERVLET_CONTEXT" "/test"
7878
"$InstrumentationTags.SERVLET_PATH" "/hello"
7979
"custom-metric" 1983
80-
// the service name is set as tag - no source expected right now
81-
serviceNameSource null
80+
// the service name is set as tag - no source is expected to be manual
81+
serviceNameSource "m"
8282
defaultTags(true)
8383
}
8484
}

0 commit comments

Comments
 (0)