open-telemetry / open-telemetry/opentelemetry-java-contrib
Export profiles using async-profiler via OTLP
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 269
- Forks
- 196
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 38
Description
Component(s)
No response
Is your feature request related to a problem? Please describe.
I'd like to profile Java applications while linking traces and profiles.
Describe the solution you'd like
I'd like to add a profiling component which uses async-profiler that emits profiles from the SDK via OTLP when profiling is enabled (eg. by setting OTEL_PROFILES_EXPORTER=otlp).
Describe alternatives you've considered
I considered using Grafana's Pyroscope integration with the Java Otel SDK https://github.com/grafana/otel-profiling-java. It uses async-profiler to export profiles and a SpanProcessor extension to link spans and profiles. However Pyroscope does not export profiles via OTLP.
I also considered using inferred-spans component which also uses async-profiler v4.
However inferred-spans exports traces and not profiles.
Additional context
Async-profiler v4 supports exporting profiles in OTLP format: https://github.com/async-profiler/async-profiler/blob/master/docs/OutputFormats.md
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
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.
Research direction
Start by reading the async-profiler v4 OutputFormats documentation and inspect the inferred-spans component for existing async-profiler usage. Compare that with the linked Pyroscope SpanProcessor to understand how profiles and spans are linked, then trace the SDK's OTEL_PROFILES_EXPORTER handling. Done means an async-profiler-based profiling component emits profiles through OTLP when profiling is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100