Increase safety of StartExternalSegment: allow nil request
@@ -120,11 +120,13 @@ func StartExternalSegment(txn Transaction, request *http.Request) *ExternalSegme
Request: request,
}
+ if request != nil && request.Header != nil {
for key, values := range s.OutboundHeaders() {
for _, value := range values {
request.Header.Add(key, value)
}
}
+ }
return s
}
