Macro opentelemetry::otel_error

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

Macro for logging error 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_error;
otel_error!(name: "export_failure", error_code = 500, version = "1.0.0");