Skip to content

Commit f797707

Browse files
committed
bump dd-trace and fix isntance check
1 parent 484f47c commit f797707

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@
601601
<jakarta-annotation-version>2.1.0</jakarta-annotation-version>
602602
<scribejava-version>8.3.1</scribejava-version>
603603
<junit-version>4.13.2</junit-version>
604-
<dd-java-agent-version>1.45.2</dd-java-agent-version>
604+
<dd-java-agent-version>1.56.0</dd-java-agent-version>
605605
<cucumber-version>7.2.3</cucumber-version>
606606
<project.scm.id>github</project.scm.id>
607607
</properties>

src/test/java/com/datadog/api/ClientSteps.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ public void setupVersion(Scenario scenario) {
5050
world.scenario = scenario;
5151
apiVersion = world.getVersion();
5252
final Span span = GlobalTracer.get().activeSpan();
53-
if (span != null) {
53+
if (span != null && span instanceof MutableSpan) {
5454
ArrayList<String> codeowners = new ArrayList<String>();
5555
for (String tag : scenario.getSourceTagNames()) {
5656
if (tag.startsWith("@team:")) {
5757
codeowners.add("@" + tag.substring(6));
5858
}
5959
}
60-
// if the agent container is not running, span is null
60+
// if the agent container is not running or tracer not initialized, span is null or noop
6161
MutableSpan localRootSpan = ((MutableSpan) span).getLocalRootSpan();
6262
localRootSpan.setTag(TEST_CODEOWNERS_TAG, new Gson().toJson(codeowners));
6363
}

src/test/java/com/datadog/api/TestUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ public void setupClock() throws IOException {
247247
@Before
248248
public void setTracingTags() {
249249
final Span span = GlobalTracer.get().activeSpan();
250-
if (span != null) {
251-
// if the agent container is not running, span is null
250+
if (span != null && span instanceof MutableSpan) {
251+
// if the agent container is not running or tracer not initialized, span is null or noop
252252
MutableSpan localRootSpan = ((MutableSpan) span).getLocalRootSpan();
253253
localRootSpan.setTag(TRACING_TAG_ENDPOINT, getTracingEndpoint());
254254
localRootSpan.setOperationName(TRACING_SPAN_TYPE);

0 commit comments

Comments
 (0)