Skip to content

Commit

Permalink
new log file prefixes and metrics for device logs
Browse files Browse the repository at this point in the history
Add new metrics for newlog:
- totalSizeLogs: total size of logs on device
- oldestSavedDeviceLog: timestamp of the latest device log saved on
device

Add new log file prefixes for device logs:
- "dev.log.upload.": device logs that are uploaded
- "dev.log.keep.": device logs that stay on the device

Signed-off-by: Paul Gaiduk <[email protected]>
  • Loading branch information
europaul committed Nov 26, 2024
1 parent c0697e7 commit 047e07d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/pillar/types/newlogtypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ import (
)

const (
// DevPrefix - device log file prefix string
// DevPrefix - general file prefix string for device log files
DevPrefix = "dev.log."
// DevPrefixUpload - file prefix string for device log files to upload
DevPrefixUpload = "dev.log.upload."
// DevPrefixKeep - file prefix string for device log files to keep on device
DevPrefixKeep = "dev.log.keep."
// AppPrefix - app log file prefix string
AppPrefix = "app."
// AppSuffix - app log file suffix string, the appuuid is between the AppPrefix and AppSuffix
Expand Down Expand Up @@ -65,6 +69,8 @@ type NewlogMetrics struct {
NumKmessages uint64 // total input kmessages
NumSyslogMessages uint64 // total input syslog message
DevTop10InputBytesPCT map[string]uint32 // top 10 sources device log input in percentage
TotalSizeLogs uint64 // total size of logs on device
OldestSavedDeviceLog time.Time // timestamp of the latest device log saved on device

// upload latency
Latency cloudDelay
Expand Down

0 comments on commit 047e07d

Please sign in to comment.