* Akka http server span names are always akka.request #3478 - removed hardcoded span name "akka.request" - implemented route() in AkkaHttpServerAttributesExtractor to provide a better span name - retrofitted AkkaHttpServerInstrumentationTest.groovy * Akka http server span names are always akka.request #3478 - removed hardcoded span name "akka.request" and changed to "HTTP {METHOD}" - retrofitted AkkaHttpServerInstrumentationTest.groovy * Akka http server span names are always akka.request #3478 - removed hardcoded span name "akka.request" and changed to "HTTP {METHOD}" - retrofitted AkkaHttpServerInstrumentationTest.groovy * Akka http server span names are always akka.request #3478 - removed hardcoded span name "akka.request" and changed to "HTTP {METHOD}" - retrofitted AkkaHttpServerInstrumentationTest.groovy and related tests
This commit is contained in:
parent
2177a22605
commit
66bf050bf8
|
@ -10,6 +10,7 @@ import akka.http.scaladsl.model.HttpResponse;
|
|||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpServerMetrics;
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanNameExtractor;
|
||||
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanStatusExtractor;
|
||||
import io.opentelemetry.instrumentation.api.server.ServerSpanNaming;
|
||||
import io.opentelemetry.javaagent.instrumentation.akkahttp.AkkaHttpUtil;
|
||||
|
@ -25,7 +26,7 @@ public class AkkaHttpServerSingletons {
|
|||
Instrumenter.<HttpRequest, HttpResponse>builder(
|
||||
GlobalOpenTelemetry.get(),
|
||||
AkkaHttpUtil.instrumentationName(),
|
||||
unused -> "akka.request")
|
||||
HttpSpanNameExtractor.create(httpAttributesExtractor))
|
||||
.setSpanStatusExtractor(HttpSpanStatusExtractor.create(httpAttributesExtractor))
|
||||
.addAttributesExtractor(httpAttributesExtractor)
|
||||
.addRequestMetrics(HttpServerMetrics.get())
|
||||
|
|
|
@ -21,13 +21,13 @@ abstract class AkkaHttpServerInstrumentationTest extends HttpServerTest<Object>
|
|||
// }
|
||||
|
||||
@Override
|
||||
String expectedServerSpanName(ServerEndpoint endpoint) {
|
||||
return "akka.request"
|
||||
boolean testCapturedHttpHeaders() {
|
||||
false
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean testCapturedHttpHeaders() {
|
||||
false
|
||||
String expectedServerSpanName(ServerEndpoint endpoint) {
|
||||
return "HTTP GET"
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -107,7 +107,7 @@ class PlayServerTest extends HttpServerTest<Server> implements AgentTestTrait {
|
|||
|
||||
@Override
|
||||
String expectedServerSpanName(ServerEndpoint endpoint) {
|
||||
return "akka.request"
|
||||
return "HTTP GET"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue