I am trying to use opentelemtry (OTEL) in akka-http application (Scala), using the stand alone agent. In my sbt I have this:
fork := true
run / javaOptions ++= Seq(
"-XX:+UseG1GC",
"-XX:MaxGCPauseMillis=100",
"-XX:+PrintGCDetails",
"-XX:+PrintTenuringDistribution",
"-XX:+PrintGCCause",
"-XX:+PrintAdaptiveSizePolicy",
"-javaagent:/myFolder/jars/opentelemetry-javaagent.jar",
"-Dotel.service.name=pantryLocalExecution",
"-Dotel.traces.exporter=otlp",
"-Dotel.metrics.exporter=otlp",
)
envVars += "OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED" -> "true"
I am using Jeager to watch all metrics that OTEL collects, then thing is, Jeager is not showing Http request, only mysql connections. Addition to that, is not grouping the flow into the same trace, Next image show what I mean. There are 3 traces which are the same flow.
Thank you all for all your help!!
Quick notes:
docker run -d --name jaeger \\n -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \\n -e COLLECTOR_OTLP_ENABLED=true \\n -p 6831:6831/udp \\n -p 6832:6832/udp \\n -p 5778:5778 \\n -p 16686:16686 \\n -p 4317:4317 \\n -p 4318:4318 \\n -p 14250:14250 \\n -p 14268:14268 \\n -p 14269:14269 \\n -p 9411:9411 \\n jaegertracing/all-in-one:1.42\
Finding and finding and creating small projects with different versions, I discovered that OTEL only works as I want (The same flow with child spans), only is necessary 10.2.0-RC2 version of akka or higher. Just keep in mind all the settings that I posted!
Thank you all!!