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 bindFlow leads to non working http tracing #5137

Closed
makssobolevs opened this issue Jan 15, 2022 · 7 comments · Fixed by #8174
Closed

Akka HTTP bindFlow leads to non working http tracing #5137

makssobolevs opened this issue Jan 15, 2022 · 7 comments · Fixed by #8174
Assignees
Labels
bug Something isn't working contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome repro provided

Comments

@makssobolevs
Copy link

makssobolevs commented Jan 15, 2022

Description
When Akka HTTP server is created via Http().newServerAt("localhost", 8080).bindFlow(...) tracing doesn't work.
ServerBuilder#bindFlow

Steps to reproduce
App.scala

object App {
  val testRoute: Route =
    pathPrefix("test") {
      get {
        complete(HttpResponse(StatusCodes.OK))
      }
    }

  def main(args: Array[String]): Unit = {
    implicit val system = ActorSystem("Test")
    implicit val ec = system.dispatcher

    Http()
      .newServerAt("localhost", 8080)
      .bindFlow(testRoute)
  }
}

Example project can be used: https://github.com/makssobolevs/akka-open-telemetry-test
curl -v http://localhost:8080/test

Would expect to see
[otel.javaagent 2022-01-15 16:43:21:043 +0300] [Test-akka.actor.default-dispatcher-8] INFO io.opentelemetry.exporter.logging.LoggingSpanExporter - 'akka.request' : 74ca4c186762a998ef416fd184f9e463 5ae09c56f79725a0 SERVER [tracer: io.opentelemetry.akka-http-10.0:1.9.2] AttributesMap{data={thread.name=Test-akka.actor.default-dispatcher-8, http.method=GET, http.scheme=http, http.host=localhost:8080, thread.id=22, http.target=/test, http.user_agent=curl/7.80.0, http.flavor=1.1, http.status_code=200}, capacity=128, totalAddedValues=9}

Actual result
No span in logs

Version
opentelemetry-javaagent 1.9.2
Akka 2.6.14
Akka HTTP 10.2.4
Scala 2.13.5
OpenJDK 11.0.13

Additional context
There is the same issue with New Relic agent newrelic/newrelic-java-agent#189.
ServerBuilder#bind which works fine can be used so it's probably not a big issue.

@makssobolevs makssobolevs added the bug Something isn't working label Jan 15, 2022
@mateuszrzeszutek mateuszrzeszutek added repro provided contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome labels Jan 17, 2022
@mateuszrzeszutek mateuszrzeszutek linked a pull request Jun 22, 2022 that will close this issue
@mateuszrzeszutek mateuszrzeszutek linked a pull request Jun 30, 2022 that will close this issue
@rahuldimri
Copy link
Contributor

Are we still working on this issue? Can I work on this ?

@mateuszrzeszutek
Copy link
Member

Hey @rahuldimri ,
I think nobody's currently working on this issue. Should I assign it to you?

@rahuldimri
Copy link
Contributor

Yes please, I want to give a try !!

@rahuldimri
Copy link
Contributor

@mateuszrzeszutek thanks for assigning this to me. I can see there are couple of PR request got closed and were part of this issue. Just wanted to check, do we need to continue working on this request.

@zackman0010
Copy link
Contributor

zackman0010 commented Aug 25, 2022

@rahuldimri Our current draft PR will actually correct this issue, we're just still having to wait on our company to sign the Corporate CLA. I've been assured they're still working on getting it signed and that it should be completed soon.

@rahuldimri
Copy link
Contributor

Sure no problem take you time.

@mateuszrzeszutek
Copy link
Member

@rahuldimri Our current draft PR will actually correct this issue, we're just still having to wait on our company to sign the Corporate CLA. I've been assured they're still working on getting it signed and that it should be completed soon.

Oh, thanks for the info! I missed the fact that your PR is still open, sorry for that 🙏

@rahuldimri I'll remove your assignment from this issue -- sorry for the confusion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome repro provided
Projects
None yet
4 participants