Macro otel_info
macro_rules! otel_info {
(name: $name:expr $(,)?) => { ... };
(name: $name:expr, $($key:ident = $value:expr),+ $(,)?) => { ... };
}
Expand description
Note: These macros (otel_info!
, otel_warn!
, otel_debug!
, and otel_error!
) are intended to be used
internally within OpenTelemetry code or for custom exporters, processors and other plugins. They are not designed
for general application logging and should not be used for that purpose.
When running tests with --nocapture
, these macros will print their output to stdout. This is useful for debugging
test failures and understanding the flow of operations during testing.
Macro for logging informational messages in OpenTelemetry.
§Fields:
name
: The operation or action being logged.- Additional optional key-value pairs can be passed as attributes.
§Example:
use opentelemetry::otel_info;
otel_info!(name: "sdk_start", version = "1.0.0", schema_url = "http://example.com");