Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Akka http server span names are always akka.request #3478 #5150

Merged
merged 6 commits into from
Jan 20, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
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;
Expand All @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class PlayServerTest extends HttpServerTest<Server> implements AgentTestTrait {

@Override
String expectedServerSpanName(ServerEndpoint endpoint) {
return "akka.request"
return "HTTP GET"
}

}