elastic / elastic/apm-agent-java
Inferred spans from loop don't seem to correlate correctly
- Lingua principale
- Java
- Stelle
- 594
- Fork
- 338
- Merge medio
- 1g 13h
- PR unite (30g)
- 25
Descrizione
Recently to investigate tail latencies for our `knn` search in Elasticsearch, we've added the capability to profile the path of execution in a search transaction, yielding traces that look like this:

What's strange is the termination of `HnswGraphSearcher#search` with the first iteration of `searchLevel`. See the expected code here:
https://github.com/apache/lucene/blob/728936eb7cbb91bfa624686007b02b086d10cf41/lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphSearcher.java#L155-L157
I would expect rather something that looks like this:

We see in the stack trace info for each subsequent `searchLevel` invocation that `HnswGraphSearcher#search` is detected, but for some reason it's not visualized:
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.