elastic / elastic/apm-agent-java

Inferred spans from loop don't seem to correlate correctly

Open
#2,840 4 comments 0 reactions 1 assignee Claimed by @SylvainJuge View on GitHub
agent-java community
Dominant language
Java
Stars
594
Forks
338
Avg merge
1d 13h
Merged PRs (30d)
25

Description

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:
image

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:
image

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:
image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.