logtail: add instance metadata to the entry logtail

Allows instances that are running with the same machine ID (due to
cloning) to be distinguished.

Also adds sequence numbers to detect duplicates.

For tailscale/corp#5244

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:
Mihai Parparita
2022-05-17 22:28:57 -07:00
committed by Mihai Parparita
parent acfe5bd33b
commit 3222bce02d
3 changed files with 103 additions and 25 deletions

View File

@@ -519,6 +519,8 @@ func New(collection string) *Policy {
}
if collection == logtail.CollectionNode {
c.MetricsDelta = clientmetric.EncodeLogTailMetricsDelta
c.IncludeProcID = true
c.IncludeProcSequence = true
}
if val := getLogTarget(); val != "" {