open-telemetry / open-telemetry/opentelemetry-java-contrib
Inferred Spans: Improve efficiency using new wall-clock profiling mode
@SylvainJuge is already working on this.
Since May 6, 2026.
- Dominant language
- Java
- Stars
- 269
- Forks
- 196
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 38
Description
Async profiler 4.0 added a new feature which improved the efficiency for sampling sleeping threads:
Previously, if a thread was blocked for e.g. a second, the profiler would periodically wake it up and collect the same stacktrace every time. With batching, the profiler got smarter: It still wakes the thread up, but then detects that the CPU-time of the thread hasn't changed, so it can omit fetching the same stacktrace again.
Unfortunately we couldn't make use of this yet and therefore had to disable this improvement for inferred spans in #1872.
Thanks to https://github.com/async-profiler/async-profiler/issues/1277 being now implemented, we could now enable this feature and still correctly infer spans.
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.
Assessment
This issue has not been assessed yet.