Sha256: 2948c17549e2b14833750ee852689d8474f0d1865c999768b33de4c1da2b8e67
Contents?: true
Size: 497 Bytes
Versions: 7
Compression:
Stored size: 497 Bytes
Contents
module RequestTracer module Integration module Base def extract_fields_from_headers(header_hash) header_hash.map do |k,v| special_header = /HTTP_X_B3_(.*)/.match(k) special_header && [B3_REQUIRED_FIELDS_FROM_SHORT_NAMES[special_header[1].downcase], v] end.compact.to_h end def extract_headers_from_fields(field_hash) B3_REQUIRED_FIELDS.map {|f| ["X_B3_" + f.gsub("_", "").upcase, field_hash[f]]}.to_h end end end end
Version data entries
7 entries across 7 versions & 1 rubygems