News for hackers. Stuff that matters.
Re:Discussion: structured, leveled logging by jbjbjbjb on Sunday September 11, 2022 @04:55PM (#32803185)
It is a config away in C# world, and even when it wasn’t so in built it was very simple to add to structured logging.
Re:Discussion: structured, leveled logging by phillipcarter on Sunday September 11, 2022 @05:37PM (#32803519)
In the C# world, tracing is also just a config away. It's baked into the runtime. But you don't need to manually stitch together logs into a "trace" - it just does it for you.
Re:Discussion: structured, leveled logging by jbjbjbjb on Sunday September 11, 2022 @06:31PM (#32803886)
What I meant was you can easily add a correlation id to your logs, and send those to wherever you collect and query the logs. Then using that you can easily see the log across your services. So there isn’t any manual stitching in the logging either.
Re:Discussion: structured, leveled logging by phillipcarter on Sunday September 11, 2022 @07:23PM (#32804215)
You can! And then if you want to establish causality from log to log, representing which part of a system calls which other part, you can add another id that lets you know which log is a “parent” of another. And maybe later, you may need to propagate metadata across a request, so you build that system and use it to better enrich your logs. And maybe later, you’ll need to correlate subsets of logs with other subsets of logs, so you build a way to “link” related sets of logs together. And so on, and so on. All of this is possible with “just logs” today and if it’s your jam, go for it. But these are reasons why tracing libraries exist.