awssdk-instrumentation 0.2.0

Out-of-the-box OpenTelemetry/X-Ray instrumentation for the AWS SDK for Rust, with first-class support for AWS Lambda
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! [`SpanWrite`] implementation for the `tracing` backend.

use tracing::Span;
use tracing_opentelemetry::OpenTelemetrySpanExt;

use super::{SpanWrite, Status, Value};

/// [`SpanWrite`] impl for `tracing::Span`, delegating to [`OpenTelemetrySpanExt`].
impl SpanWrite for Span {
    fn set_attribute(&mut self, key: &'static str, value: impl Into<Value>) {
        OpenTelemetrySpanExt::set_attribute(self, key, value);
    }

    fn set_status(&mut self, status: Status) {
        OpenTelemetrySpanExt::set_status(self, status);
    }
}