Skip to content

Commit

Permalink
reduce spectatord logging (#75)
Browse files Browse the repository at this point in the history
The `Sent:` messages serve as a positive confirmation that spectatord is
either delivering or dropping measurements, but there is generally no action
to be taken from it directly, and this information is also recorded in the
`spectator.measurements` metric.

In the case of Titus, this message alone is responsible for 25% of all logs.

Moving this message to the `debug` level drops it from the standard use case,
while still allowing it to be accessed if the `--verbose` flag is passed to
the binary.

Fixes #71.
  • Loading branch information
copperlight authored Oct 18, 2023
1 parent 63c2691 commit 6d83ee2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spectator/publisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ class Publisher {
}

auto elapsed = absl::Now() - start;
logger->info("Sent: {} Dropped: {} Total: {}. Elapsed {:.3f}s", num_sent,
num_err, measurements.size(), absl::ToDoubleSeconds(elapsed));
logger->debug("Sent: {} Dropped: {} Total: {}. Elapsed {:.3f}s", num_sent,
num_err, measurements.size(), absl::ToDoubleSeconds(elapsed));
for (const auto& m : err_messages) {
logger->info("Validation error: {}", m);
}
Expand Down

0 comments on commit 6d83ee2

Please sign in to comment.