Hacker News new | ask | show | jobs
by chimeracoder 3144 days ago
> Metrics are a tool that take a different approach to logs, once you get beyond small systems you need both. I talked about this earlier in the year:

Quite the opposite - the "some purposes" I'm talking about are precisely the small scale. As scale grows, the use case of logs and metrics converges, and metrics become a strictly better tool.

2 comments

The question is about tracking and storing individual events (logs) with arbitrary per-item detail vs. dimensionally limited aggregations (time series / metrics). In either case, I think we agree that the data should be recorded in a structured way, and when I say "logs" I just mean a record of individual items, not of sampled/aggregated metrics.

Given that, you need both logs (individual events) and metrics. Logs give you crucial insight into individual interesting events such as single requests that bring your service down, but logs are orders of magnitude more expensive than metrics in tracking, storage, and processing. So that's why you use metrics for a much wider scope and for longer time periods.

Not for high cardinality events like what happened to a particular user during a single session. Metrics will never help with that type of problem.
> Not for high cardinality events like what happened to a particular user during a single session. Metrics will never help with that type of problem.

No, and as I explain in both that article and the video, logs aren't the best solution for that use case either.