macro_rules! initialize_observability { ($provider_name:expr, $maybe_flamegraphs_path:expr) => { ... }; }
Expand description
Initialize observability for a given provider with host-supplied data, via tracing
.
This functionality exists as a macro due to the requirement that tracing
be initialized
from binary code, rather than library code.
This macro loads host data and uses the provider-sdk to build a [tracing_core::Dispatch
] and
relevant guards/internal structures to configure it with information relevant to the host
This macro introduces the following variables into scope:
__observability__guard
ยงArguments
provider_name
- An expression that evaluates to a&str
which is the name of your providermaybe_flamegraphs_path
- An expression that evaluates to aOption<impl AsRef<Path>>
for flamegraph path