Skip to content

Commit

Permalink
Fix XrayPropagator when no header is present (#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
khalsah committed Aug 27, 2022
1 parent c92a1ad commit 043e4b7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions opentelemetry-aws/src/lib.rs
Expand Up @@ -203,11 +203,9 @@ pub mod trace {
}

fn extract_with_context(&self, cx: &Context, extractor: &dyn Extractor) -> Context {
let extracted = self
.extract_span_context(extractor)
.unwrap_or_else(|_| SpanContext::empty_context());

cx.with_remote_span_context(extracted)
self.extract_span_context(extractor)
.map(|sc| cx.with_remote_span_context(sc))
.unwrap_or_else(|_| cx.clone())
}

fn fields(&self) -> FieldIter<'_> {
Expand Down

0 comments on commit 043e4b7

Please sign in to comment.