Skip to content

Commit

Permalink
Merge pull request #662 from kierendavies/otel-getter
Browse files Browse the repository at this point in the history
OpenTelemetry: Return null when getting a missing header
  • Loading branch information
mpilquist authored Nov 22, 2022
2 parents 0c1dc5c + 3ee8607 commit 8d72092
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private[opentelemetry] object OpenTelemetrySpan {
override def keys(carrier: Kernel): lang.Iterable[String] = carrier.toHeaders.keys.asJava

override def get(carrier: Kernel, key: String): String =
carrier.toHeaders(key)
carrier.toHeaders.getOrElse(key, null)
}

private val spanContextSetter = new TextMapSetter[mutable.Map[String, String]] {
Expand Down

0 comments on commit 8d72092

Please sign in to comment.