Skip to content

[chore][translator/pprof] Convert pprofile to pprof#44357

Merged
atoulme merged 29 commits into
open-telemetry:mainfrom
florianl:convertPprofileToPprof
Jan 14, 2026
Merged

[chore][translator/pprof] Convert pprofile to pprof#44357
atoulme merged 29 commits into
open-telemetry:mainfrom
florianl:convertPprofileToPprof

Conversation

@florianl
Copy link
Copy Markdown
Member

Description

After convertPprofToPprofile() implement also convertPprofileToPprof().

Once open-telemetry/opentelemetry-collector#13915 and this PR got merged, we can start a pprof to OTel profiles and vice versa conversion.

Ping @open-telemetry/profiling-approvers

Link to tracking issue

Fixes

Testing

Documentation

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
After convertPprofToPprofile implement also convertPprofileToPprof.

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Comment thread pkg/translator/pprof/pprof_to_profiles_test.go Outdated
Copy link
Copy Markdown
Member

@felixge felixge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! PR LGTM for the most parts, but the testing needs improvement and there also seems to be a bug with the location indexes in the stack table getting reordered by accident.

You can merge the commits from this PR to address most of these issue: florianl#1

For the rest see my comments on the PR.

Comment thread pkg/translator/pprof/pprof_to_profiles.go Outdated
Comment thread pkg/translator/pprof/pprof_to_profiles.go Outdated
Comment thread pkg/translator/pprof/pprof_to_profiles.go Outdated
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 3, 2026

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions Bot added the Stale label Jan 3, 2026
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@github-actions github-actions Bot removed the Stale label Jan 6, 2026
@florianl
Copy link
Copy Markdown
Member Author

florianl commented Jan 6, 2026

Friendly ping for feedback @open-telemetry/profiling-approvers

Copy link
Copy Markdown
Member

@christos68k christos68k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't have time to test extensively

Comment thread pkg/translator/pprof/pprof_to_profiles.go Outdated
Comment thread pkg/translator/pprof/pprof_to_profiles.go Outdated
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Copy link
Copy Markdown
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am ok approving and merging this PR, however, the functions created are not exported, and therefore will not be available outside the module, and they return a pointer to a pprofile.Profiles object rather than passing by value as most translators do.

I don't mind if we merge this PR and attend to this in subsequent PRs, just pointing out the code is not currently usable outside the module.

@florianl
Copy link
Copy Markdown
Member Author

florianl commented Jan 12, 2026

Thank you for the review @atoulme . I really appreciate the feedback regarding the export visibility and the pointer vs. value returns.

I wanted to share some context on the current structure: keeping this PR in a reviewable state has been a significant time investment due to the constant upstream changes in the OTel Collector and Contrib repositories over the past few months since this PR got created. To ensure the logic landed safely and stayed manageable, I prioritized getting the core functionality implemented and stabilized first.

I agree that making these functions public and integrating them into components like pprofreceiver is the right next step. However, doing so within this specific PR would have significantly increased the maintenance overhead and the 'surface area' for merge conflicts.

My plan is to address the visibility and pass-by-value conventions in a follow-up PR immediately after this lands. That change should be much smaller, straightforward, and easier to review, which I hope will allow for a quicker turnaround.

Looking forward to getting this landed so I can start on those improvements!

@atoulme atoulme merged commit 38ffc29 into open-telemetry:main Jan 14, 2026
189 of 191 checks passed
@github-actions github-actions Bot added this to the next release milestone Jan 14, 2026
@atoulme
Copy link
Copy Markdown
Contributor

atoulme commented Jan 14, 2026

Sounds good. Merged!

atoulme added a commit that referenced this pull request Feb 4, 2026
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Follow up to
#44357

Implement the functionality of transforming pprof to OTel Profiles

FYI: @open-telemetry/profiling-approvers 

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Co-authored-by: Antoine Toulme <antoine@toulme.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants