Skip to content

Commit

Permalink
Switch fingerprinter to checksum
Browse files Browse the repository at this point in the history
Signed-off-by: MOZGIII <[email protected]>
  • Loading branch information
MOZGIII committed Jun 23, 2020
1 parent 62e3136 commit ecf28a3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/sources/kubernetes_logs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,12 @@ impl Source {
max_line_bytes: 32 * 1024, // 32 KiB
data_dir,
glob_minimum_cooldown: Duration::from_secs(10),
// Use device inodes for fingerprinting.
// - Docker recreates files on rotation: https://github.com/moby/moby/blob/75d655320e2a443185f8fa4992dc89bd2da0ea68/daemon/logger/loggerutils/logfile.go#L182-L222
// - CRI-O recreates files on rotation: https://github.com/cri-o/cri-o/blob/ad83d2a35a30b8a336b16a0ea5f7afc6aebfb9b7/internal/oci/runtime_oci.go#L988-L1042
// The rest should do the same.
fingerprinter: Fingerprinter::DevInode,
fingerprinter: Fingerprinter::Checksum {
// This value is based on the smallest meaningful log file size,
// taking into account Docker and CRI log formats.
fingerprint_bytes: 40,
ignored_header_bytes: 0,
},
oldest_first: false,
};

Expand Down

0 comments on commit ecf28a3

Please sign in to comment.