1. 8
  1. 3

    Alternatively, utilising distributed tracing (even without distribution) is a great alternative to logging. That same information from your logs can be stuffed into a span; you still have the information locally, and when you deploy your app, that same information is available for helping troubleshoot production.

    Not to mention, setting typed properties (e.g. found_user: true ) makes the information smaller (in bytes), more filterable (where found_user = false Vs text searching for a missing log line), and richer (it’s part of a trace of one action in a process, or as part of multiple processes) than text logs.

    So while I think console.log logging can be helpful, it would be better to have tracing setup so that your debug data is more useful, imo.

    1. 2

      What is this “distributed tracing” thing? The only links I found were something about micro services.

      1. 1

        Honeycomb is a good implementation of distributed tracing.

        1. 1

          Not surprising, it is a really helpful thing to have in that space. But you don’t have to have microservices, distributed tracing is handy even in standard 3 layers architectures. I picture it as the child of the debugger and the logs. Especially powerful combined with apms.

          You can look into jaeger, zipkin, and opentelemetry . Or commercially there’s a ton, from newrelic to hepsagon (potentially misspelled)