News for hackers. Stuff that matters.
Re:A Practitioner's Guide to Wide Events by valyala on Thursday December 26, 2024 @01:47PM (#42516913)
Wide events are plain old structured logs with many fields. They can be represented as JSON. They also can be represented as logfmt, protobuf or any other format suitable for representing a set of (field=value) pairs.

The novelty of wide events is that it is recommended to:

- emit an event (leg entry) once per every processed request. Previously it was OK to emit many logs per request. This could complicate degugging and analyzing such logs.

- don't afraid to add fields to the event if these fields can help debugging and/or analyzing the logs. Previously it was recommended artificially limiting the number of log fields to some small value. This could prevent from debugging and analyzing such logs in the future.

Re:A Practitioner's Guide to Wide Events by brunoqc on Thursday December 26, 2024 @10:58PM (#42519823)
Can you emit only 1 event per request when you use the open telemetry collector are you emit a bunch of spans? I think I saw that Victoria logs support the otel collector.
Re:A Practitioner's Guide to Wide Events by valyala on Friday December 27, 2024 @06:52PM (#42527204)
You can emit as many events per request as you wish, and store all of them to VictoriaLogs. But it is recommended emitting a single "master" event with all the context and useful information about the request in separate fields, which then can help debugging and analyzing the processed requests.
Re:A Practitioner's Guide to Wide Events by oulipo on Friday December 27, 2024 @06:36AM (#42521435)
One event per request seems okay in some monitoring scenarios, but in debugging scenarios you might want to instrument many functions
Re:A Practitioner's Guide to Wide Events by masterj on Friday December 27, 2024 @04:50PM (#42526373)
One main event per request with a lot of context does not mean that’s the only data you emit. You can emit “normal” log lines too, or use granular log levels, etc.

However for understanding how your system or your users are behaving, querying the wide or “main” events will be far better as entry points for exploration.