File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
src/test/java/com/datadog/api Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments