Skip to content

Commit

Permalink
libbeat: send string constants in monitoring messages everytime
Browse files Browse the repository at this point in the history
  • Loading branch information
kvch committed Jan 9, 2018
1 parent a35deef commit 73a3915
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libbeat/monitoring/report/log/log.go
Expand Up @@ -41,6 +41,11 @@ var gauges = map[string]bool{
"system.load.norm.15": true,
}

// TODO: Change this when gauges are refactored, too.
var strConsts = map[string]bool{
"beat.info.ephemeral_id": true,
}

var (
// StartTime is the time that the process was started.
StartTime = time.Now()
Expand Down Expand Up @@ -141,7 +146,9 @@ func makeDeltaSnapshot(prev, cur monitoring.FlatSnapshot) monitoring.FlatSnapsho
}

for k, s := range cur.Strings {
if p, ok := prev.Strings[k]; !ok || p != s {
if _, found := strConsts[k]; found {
delta.Strings[k] = s
} else if p, ok := prev.Strings[k]; !ok || p != s {
delta.Strings[k] = s
}
}
Expand Down

0 comments on commit 73a3915

Please sign in to comment.