open-telemetry / open-telemetry/opentelemetry-java-instrumentation
Akka traces aren't being generated (Scala)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1.2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 228
Description
Description
Akka actor traces are not being generated
Steps to reproduce
HTTP GET request (curl -v http://localhost:8080/test) is triggering ask call:
val result = testActor ? Message("test")
TestActor replies after sleep.
override def receive: Receive = {
case Message(x) =>
Thread.sleep(1000)
sender() ! ReplyMessage(s"$x - reply")
}
See https://github.com/makssobolevs/akka-open-telemetry-test
What did you expect to see?
I would expect to see both akka-http and akka traces for single http GET request.
What did you see instead?
I see only akka-http traces,
[otel.javaagent 2022-01-15 17:54:05:901 +0300] [Test-akka.actor.default-dispatcher-5] INFO io.opentelemetry.exporter.logging.LoggingSpanExporter - 'akka.request' : 6a4300eaa53f60b80ae33e87e937d7bc 6213f1d2d19da9ec SERVER [tracer: io.opentelemetry.akka-http-10.0:1.9.2] AttributesMap{data={thread.name=Test-akka.actor.default-dispatcher-5, http.method=GET, http.scheme=http, http.host=localhost:8080, thread.id=17, http.target=/test, http.user_agent=curl/7.80.0, http.flavor=1.1, http.status_code=200}, capacity=128, totalAddedValues=9}
no traces related to TestActor
Version
opentelemetry-javaagent 1.9.2
Akka 2.6.14
Akka HTTP 10.2.4
Scala 2.13.5
OpenJDK 11.0.13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked akka-open-telemetry-test example, the HTTP GET to /test, and TestActor.scala, especially the ask call and receive handler. Reproduce the request with curl and inspect the agent output. Done means the single request produces both akka-http and TestActor-related Akka traces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, scala
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100