observability: tracing gum, automatically cross ref traceID (#5079)

* add some gum

* bump expander

* gum

* fix all remaining issues

* last fixup

* Update node/gum/proc-macro/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* change

* netowrk

* fixins

* chore

* allow optional fmt str + args, prep for expr as kv field

* tracing -> gum rename fallout

* restrict further

* allow multiple levels of field accesses

* another round of docs and a slip of the pen

* update ADR

* fixup lock fiel

* use target: instead of target=

* minors

* fix

* chore

* Update node/gum/README.md

Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
This commit is contained in:
Bernhard Schuster
2022-03-15 12:05:16 +01:00
committed by GitHub
parent fa359fd1f7
commit d631f1dea8
130 changed files with 1708 additions and 808 deletions
@@ -624,9 +624,9 @@ pub(crate) fn impl_task_kind(info: &OverseerInfo) -> proc_macro2::TokenStream {
let fut = Box::pin(async move {
if let Err(e) = future.await {
#support_crate ::tracing::error!(subsystem=name, err = ?e, "subsystem exited with error");
#support_crate ::gum::error!(subsystem=name, err = ?e, "subsystem exited with error");
} else {
#support_crate ::tracing::debug!(subsystem=name, "subsystem exited without an error");
#support_crate ::gum::debug!(subsystem=name, "subsystem exited without an error");
}
let _ = tx.send(());
});
@@ -635,7 +635,7 @@ pub(crate) fn impl_task_kind(info: &OverseerInfo) -> proc_macro2::TokenStream {
futures.push(Box::pin(
rx.map(|e| {
tracing::warn!(err = ?e, "dropping error");
gum::warn!(err = ?e, "dropping error");
Ok(())
})
));
@@ -82,7 +82,7 @@ pub(crate) fn impl_channels_out_struct(info: &OverseerInfo) -> Result<proc_macro
};
if let Err(subsystem_name) = res {
#support_crate ::tracing::debug!(
#support_crate ::gum::debug!(
target: LOG_TARGET,
"Failed to send (bounded) a message to {} subsystem",
subsystem_name
@@ -114,7 +114,7 @@ pub(crate) fn impl_channels_out_struct(info: &OverseerInfo) -> Result<proc_macro
};
if let Err(subsystem_name) = res {
#support_crate ::tracing::debug!(
#support_crate ::gum::debug!(
target: LOG_TARGET,
"Failed to send_unbounded a message to {} subsystem",
subsystem_name
@@ -212,7 +212,7 @@ pub(crate) fn impl_overseen_subsystem(info: &OverseerInfo) -> proc_macro2::Token
}).timeout(MESSAGE_TIMEOUT).await
{
None => {
#support_crate ::tracing::error!(
#support_crate ::gum::error!(
target: LOG_TARGET,
%origin,
"Subsystem {} appears unresponsive.",