This is a great question! Here's a first cut.
Be able to log at multiple levels (ex: debug, warning, etc.).
hslogger is easily the most popular logging framework.
Be able to collect and share metrics/statistics about the types of work the program is doing and how long that work is taking. Ideally, the collected metrics are available in a format that's compatible with commonly-used monitoring tools like Ganglia, or can be so munged.
I'm not aware of any standardized reporting tools, however, extracting reports from +RTS -s
streams (or via profiling output flags) has been something I've done in the past.
$ ./A +RTS -s
64,952 bytes allocated in the heap
1 MB total memory in use
%GC time 0.0% (6.1% elapsed)
Productivity 100.0% of total user, 0.0% of total elapsed
You can get this in machine-readable format too:
$ ./A +RTS -t --machine-readable
[("bytes allocated", "64952")
,("num_GCs", "1")
,("average_bytes_used", "43784")
,("max_bytes_used", "43784")
,("num_byte_usage_samples", "1")
,("peak_megabytes_allocated", "1")
,("init_cpu_seconds", "0.00")
,("init_wall_seconds", "0.00")
,("mutator_cpu_seconds", "0.00")
,("mutator_wall_seconds", "0.00")
,("GC_cpu_seconds", "0.00")
,("GC_wall_seconds", "0.00")
]
Ideally you could attach to a running GHC runtime over a socket and look at these GC stats interactively, but currently that's not super easy (needs an FFI bindings to the "rts/Stats.h" interface). You can attach to a process using ThreadScope and monitor GC and threading behavior.
Similar flags are available for incremental, logged time and space profiling, which can be used for monitoring (e.g. these graphs can be built incrementally).
hpc collects a lot of statistics about program execution, via its Tix
type, and people have written tools to log by time-slice what code is executing.
Be configurable, ideally via a system that allows configured properties in running programs to be updated without restarting said programs.
Several tools are available for this, you can do xmonad-style state reloading; or move up to code hotswapping via plugins* packages or hint. Some of these are more experimental than others.
Reproducible deployments
Galois recently released cabal-dev, which is a tool for doing reproducible builds (i.e. dependencies are scoped and controlled).