Skip to content

Commit

Permalink
Use buildID instead of fileID for pprof mapping buildID (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsavoire authored Jun 3, 2024
1 parent a9fb8f7 commit 76093fb
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 76093fb

Please sign in to comment.