Skip to main content

record_span_attribute

Function record_span_attribute 

Source
pub fn record_span_attribute(
    span: &Span,
    key: &'static str,
    value: impl Into<SpanAttributeValue>,
)
Expand description

Record a tracing span field and set the same OpenTelemetry span attribute.

tracing can only record fields declared when the span was created. If the field was not declared, the tracing record is ignored while the OpenTelemetry attribute is still set.