Skip to content

Conversation

florianl
Copy link
Contributor

Follow up to #40548

FYI: @atoulme @felixge @aalexand

TODO:

  • verify result
  • more tests

const (
// noAttrUnit is a helper to indicate that no
// unit is associated to this Attribute.
noAttrUnit = int32(-1)
Copy link
Member

Choose a reason for hiding this comment

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

Can this be a zero? I think with the "zero index == null" convention we've been trying to avoid having to use -1 as a special value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

noAttrUnit is just an conversion internal helper and will not be seen in the resulting OTel profiles output. As every positive value can indicate a unit, i needed something to indicate that no unit is set for this attribute.

@atoulme
Copy link
Contributor

atoulme commented Oct 2, 2025

Thank you for this work. A nit on the test code, and a few notes on the TODOs in the code. Do you want to address the TODOs in this PR or deal with them in other PRs?

lastFunctionTableIdx int32
}

func convertPprofToPprofile(src *profile.Profile) (*pprofile.Profiles, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocker for this PR, but if we are willing to add a pprof exporter, we could consider moving this to a pprof translator package

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe @MovieStoreGuy or @atoulme can answer the question on why they chose to create receiver/pprofreceiver over a translator package.

Signed-off-by: Florian Lehner <[email protected]>
@florianl
Copy link
Contributor Author

florianl commented Oct 3, 2025

[..] a few notes on the TODOs in the code. Do you want to address the TODOs in this PR or deal with them in other PRs?

@atoulme the TODOs were a reminder for myself to discuss the topic of the id fields from pprof with the Profiling SIG. As this is not relevant for this PR, I have removed them with 00333f2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants