Macro opentelemetry::otel_warn

source ·
macro_rules! otel_warn {
    (name: $name:expr $(,)?) => { ... };
    (name: $name:expr, $($key:ident = $value:expr),+ $(,)?) => { ... };
}
Expand description

Macro for logging warning 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_warn;
otel_warn!(name: "export_warning", error_code = 404, version = "1.0.0");