Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@
<jakarta-annotation-version>2.1.0</jakarta-annotation-version>
<scribejava-version>8.3.1</scribejava-version>
<junit-version>4.13.2</junit-version>
<dd-java-agent-version>1.45.2</dd-java-agent-version>
<dd-java-agent-version>1.56.0</dd-java-agent-version>
<cucumber-version>7.2.3</cucumber-version>
<project.scm.id>github</project.scm.id>
</properties>
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/datadog/api/ClientSteps.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ public void setupVersion(Scenario scenario) {
world.scenario = scenario;
apiVersion = world.getVersion();
final Span span = GlobalTracer.get().activeSpan();
if (span != null) {
if (span != null && span instanceof MutableSpan) {
ArrayList<String> codeowners = new ArrayList<String>();
for (String tag : scenario.getSourceTagNames()) {
if (tag.startsWith("@team:")) {
codeowners.add("@" + tag.substring(6));
}
}
// if the agent container is not running, span is null
// if the agent container is not running or tracer not initialized, span is null or noop
MutableSpan localRootSpan = ((MutableSpan) span).getLocalRootSpan();
localRootSpan.setTag(TEST_CODEOWNERS_TAG, new Gson().toJson(codeowners));
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/datadog/api/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ public void setupClock() throws IOException {
@Before
public void setTracingTags() {
final Span span = GlobalTracer.get().activeSpan();
if (span != null) {
// if the agent container is not running, span is null
if (span != null && span instanceof MutableSpan) {
// if the agent container is not running or tracer not initialized, span is null or noop
MutableSpan localRootSpan = ((MutableSpan) span).getLocalRootSpan();
localRootSpan.setTag(TRACING_TAG_ENDPOINT, getTracingEndpoint());
localRootSpan.setOperationName(TRACING_SPAN_TYPE);
Expand Down
Loading