Skip to content

Commit

Permalink
Use buildID instead of fileID for pprof mapping buildID
Browse files Browse the repository at this point in the history
  • Loading branch information
nsavoire committed May 31, 2024
1 parent 9d24956 commit 6e15c0d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion reporter/datadog_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,16 @@ func (r *DatadogReporter) getPprofProfile() (profile *pprofile.Profile,
// Next step: Select a proper default value,
// if the name of the executable is not known yet.
var fileName = unkownStr
var buildID = trace.files[i].StringNoQuotes()
if exists {
fileName = executionInfo.fileName
if executionInfo.buildID != "" {
buildID = executionInfo.buildID
}
}

tmpMapping := createPprofMapping(profile, uint64(trace.linenos[i]), fileName,
trace.files[i].StringNoQuotes())
buildID)
fileIDtoMapping[trace.files[i]] = tmpMapping
loc.Mapping = tmpMapping
}
Expand Down

0 comments on commit 6e15c0d

Please sign in to comment.