Skip to content

Commit

Permalink
symbolication: reduce error logs for short-lived executables
Browse files Browse the repository at this point in the history
short lived executables might no longer exist by the time we want
to copy symbols, this hopefully reduces the amount of error logs
that the uploader outputs for those executables
  • Loading branch information
Gandem committed Jul 9, 2024
1 parent 9f1059c commit 85756b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions symbolication/datadog_uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ func (d *DatadogUploader) HandleExecutable(elfRef *pfelf.Reference, fileID libpf
return
}

_, err = os.Stat(inputFilePath)
if err != nil {
d.uploadCache.Remove(fileID)
log.Debugf("Skipping symbol extraction for short-lived executable %s: %v", fileName,
err)
return
}

err = d.handleSymbols(inputFilePath, e)
if err != nil {
d.uploadCache.Remove(fileID)
Expand Down

0 comments on commit 85756b8

Please sign in to comment.