foundations
foundations copied to clipboard
Add ability for logging to record tracing span log entries
In large environments with separate logging and tracing pipelines, identifying pertinent log information for a trace can involve searching in an entirely different store, which may be subject to its own sampling and rate limiting. For these situations, the log lines generate specifically whilst the traced action is executed are particularly high value in providing additional context.
This change adds trace emission options for the logging module, which allow enabling emitting logs from traces at a separately specified verbosity level, which can be changed the same was as we can with set_verbosity.
To fully specify log fields, add_span_log_fn is added as a macro to the tracing module, at a cost of losing the full abstraction over rustracing.
Fixes #58