Skip to content

Commit

Permalink
add more telemetry
Browse files Browse the repository at this point in the history
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
  • Loading branch information
blt committed Oct 28, 2024
1 parent 0dd805d commit 49411e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lading/src/generator/file_gen/logrotate_fs/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ impl File {
self.status_tick = now;
}

counter!("bytes_read").increment(request);
self.bytes_read = self.bytes_read.saturating_add(request);
}

Expand All @@ -162,6 +163,7 @@ impl File {
let diff = now.saturating_sub(self.modified_tick);
let bytes_accum = diff.saturating_mul(self.bytes_per_tick);

counter!("bytes_written").increment(bytes_accum);
self.bytes_written = self.bytes_written.saturating_add(bytes_accum);
self.modified_tick = now;
self.status_tick = now;
Expand Down

0 comments on commit 49411e9

Please sign in to comment.