Propagating Pyroscope labels to async worker threads in Java
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- java
- Domain
- observability-sre
Research direction
Start by reviewing the Java agent's LabelsWrapper behavior and how the async operations triggered by doStuff() move work to other threads. Determine whether label propagation can be supported without manually wrapping each async call; done means worker-thread profiling retains the labels from the originating operation.
Written by the indexing model from the issue text.
Description
Hello,
I'm using the Pyroscope Java profiling agent to profile a Java application which does a lot of async tasks. I have a method like this:
public CompletableFuture<?> method() {
return Pyroscope.LabelsWrapper.run(new LabelsSet(key, value), () -> doStuff());
}
The issue is that doStuff() triggers async operations executed on different worker threads. The labels set via LabelsWrapper.run() don't propagate to these worker threads, so the async work isn't profiled with the correct labels.
Is there a recommended way to handle this without adding significant verbosity to the existing code? I'm hoping to avoid manually wrapping every async call.
- Dominant language
- Java
- Stars
- 125
- Forks
- 48
- Avg merge
- 1h 8m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from grafana/pyroscope-java
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
grafana/pyroscope-java#294 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
grafana/pyroscope-java#368 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
grafana/pyroscope-java#360 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
grafana/pyroscope-java#283 ·
-
libasyncProfiler-linux-x64.so dump in /tmpMay be free again @korniltsev-grafanista claimed this 249 days ago, and no pull request is open. Open
grafana/pyroscope-java#250 · 1 comment · 1 assignee ·
All issues in grafana/pyroscope-java
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
liquid-java/liquidjava#321 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
OpenConext/OpenConext-access#1015 ·
Maintainers usually reply within 1 day
-
68000: FDBcc branch target is 2 bytes too low (uses inst_start+2 instead of the displacement word)Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NationalSecurityAgency/ghidra#9702 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
apache/rocketmq-dashboard#5358 ·
Maintainers usually reply within 3 days