open-telemetry / open-telemetry/opentelemetry-java-contrib

Inferred Spans: Improve efficiency using new wall-clock profiling mode

Open
#2,545 0 comments 0 reactions 3 assignees View on GitHub

@SylvainJuge is already working on this.

Since May 6, 2026.

component:inferred-spans
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.