JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.74k stars 5.49k forks source link

It would be helpful if `jl_print_task_backtraces()` could print to an IO or a file, or limit the output #47932

Open NHDaly opened 1 year ago

NHDaly commented 1 year ago

We log our stderr logs to DataDog, which doesn't work well with raw prints to stderr. DataDog expects JSON-formatted logs. We have two issues with the current approach:

  1. Most important: the datadog exporter seems to skip lines when there is too much dumped too fast. (I cannot find this described in their docs, but it's what we have experienced when using this feature.)
  2. the logs are hard to search and hard to export when they're logged as individual lines.

Another option that could help would be to skip logging finished Tasks, which would significantly reduce the amount of data logged.

vilterp commented 1 year ago

This would also allow us to make a task dump HTTP endpoint.

NHDaly commented 1 year ago

Oh, yeah, great point, instead of logging to datadog thru stderr, we could log to a file then dump the file over the http connection 👍 👍

Yeah, this would be nice