-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: otlp pprof fixes #3741
fix: otlp pprof fixes #3741
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
dst.Location = []*googleProfile.Location{} | ||
locationMappingIndexAddressMap := make(map[uint64]uint64) | ||
// Convert locations and mappings | ||
for i, loc := range src.Location { | ||
gl := convertLocationBack(loc) | ||
gl.Id = uint64(i + 1) | ||
if len(gl.Line) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So my understanding is that we only create those "placeholder" functions currently, as our query path relies on them to deduplicate.
I think a comment would be nice explaining that.
Maybe something worth considering doing later in the write path. Because if I sent currently Google pprofs without symbols I have the exact same problem. Or am I missing something 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... I didn't test it, but it should be the same if we happen to receive pprof without symbols (lines) 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
} | ||
return int64(stringmap[s]) | ||
} | ||
addstr("") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to do it explicitly for https://github.com/google/pprof/blob/1e3fdc7de4679692c8c3bafdb87274f45090c73a/proto/profile.proto#L66
dst.Location = []*googleProfile.Location{} | ||
locationMappingIndexAddressMap := make(map[uint64]uint64) | ||
// Convert locations and mappings | ||
for i, loc := range src.Location { | ||
gl := convertLocationBack(loc) | ||
gl.Id = uint64(i + 1) | ||
if len(gl.Line) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... I didn't test it, but it should be the same if we happen to receive pprof without symbols (lines) 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for doing this!
libfoo.so 0x...