tracing is better than logging

  • information about time spans is very valuable for profiling

    2023-10-03
  • and you do not have to worry about “should I log before I start the operation, or after I end the operation?”

    2023-10-03
  • additionally, traces made of spans are way easier to visualize than tonnes of logs

    2023-10-03
    • if you’ve never tried Perfetto or similar tools, I highly recommend giving it a shot

      2023-10-03
  • I also imagine visualizing traces live in your CLI could yield a very nice user experience, with a visible progress indicator as to what eg. your compiler is working on right now at a glance, reassuring you that it is not stuck on some while (true) {} in constant evaluation

    2023-10-03
    • perhaps emitting warnings along the road for things that take alarmingly long, so that you can keep your build times in check

      2023-10-03
    • though printing to stdout is quite slow, so perhaps limiting the frequency or depth would be a worthwhile thing to do

      2023-10-03