Fix finatra latest deps test
MODIFY
instrumentation/finatra-2.9/javaagent/src/latestDepTest/scala/io/opentelemetry/javaagent/instrumentation/finatra/FinatraServerLatestTest.scala
instrumentation/finatra-2.9/javaagent/src/latestDepTest/scala/io/opentelemetry/javaagent/instrumentation/finatra/FinatraServerLatestTest.scala
package io.opentelemetry.javaagent.instrumentation.finatra
import com.twitter.finatra.http.HttpServer
-import io.opentelemetry.api.common.Attributes
import io.opentelemetry.api.trace.SpanKind
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension
import io.opentelemetry.instrumentation.testing.junit.http.{
@@ -15,8 +14,10 @@ import io.opentelemetry.instrumentation.testing.junit.http.{
HttpServerTestOptions,
ServerEndpoint
}
+import io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo
import io.opentelemetry.sdk.testing.assertj.SpanDataAssert
import io.opentelemetry.sdk.trace.data.StatusData
+import io.opentelemetry.semconv.trace.attributes.SemanticAttributes
import org.junit.jupiter.api.extension.RegisterExtension
import java.util.concurrent.Executors
@@ -66,7 +67,12 @@ class FinatraServerLatestTest extends AbstractHttpServerTest[HttpServer] {
"FinatraController"
)
.hasKind(SpanKind.INTERNAL)
- .hasAttributes(Attributes.empty())
+ .hasAttributesSatisfyingExactly(
+ equalTo(
+ SemanticAttributes.CODE_NAMESPACE,
+ "io.opentelemetry.javaagent.instrumentation.finatra.FinatraController"
+ )
+ )
if (endpoint == ServerEndpoint.EXCEPTION) {
span

Fix finatra latest deps test (#6616)